Social animals use recognition cues to discriminate between group members and non-members. These recognition cues may be conceptualized as a label, which is compared to a neural representation of acceptable cue combinations termed the template. In ants and other social insects, the label consists of a waxy layer of colony-specific hydrocarbons on the body surface. Genetic and environmental differences between colony members may confound recognition and social cohesion, so many species perform behaviors that homogenize the odor label, such as mouth-to-mouth feeding and allogrooming. Here, we test for another mechanism of cue exchange: indirect transfer of cuticular hydrocarbons via the nest material. Using a combination of chemical analysis and behavioral experiments with Camponotus aethiops ants, we show that nest soil indirectly transfers hydrocarbons between ants and affects recognition behavior. We also found evidence that olfactory cues on the nest soil influence nestmate recognition, but this effect was not observed in all colonies. These results demonstrate that cuticular hydrocarbons deposited on the nest soil are important in creating uniformity in the odor label and may also contribute to the template.