Many rituals are socially stipulated such that engaging in a group's rituals can fundamentally signal membership in that group. Here, we asked whether infants infer information about people's social affiliation based on whether those people perform the same ritualistic action versus different actions. We presented 16-month-old infants with two people who used the same object to achieve the same goal: turning on a light. In a first study, the actions that the actors used to turn on the light had key properties of ritual: they were not causally necessary to reach the overall goal, and there were no features of the situation that required doing the particular actions. We varied whether the two actors performed the same action or performed different actions to turn on the light. Infants expected people who used the same ritualistic action to be more likely to affiliate than people who used different actions. A second study indicated that these results were not due to perceptual similarity: when the differences in the actors' actions were not marked by properties of ritual, but were instead due to situational constraints, infants expected the actors to affiliate. Thus, infants understand the social significance of people engaging in common, potentially ritualistic actions, and expect these actions to provide information about third-party social relationships.