Social interactions between cows play a fundamental role in the daily activities of dairy cattle. Real-time location systems provide on a continuous and automated basis information about the position of individual cows inside barns, offering a valuable opportunity to monitor dyadic social contacts. Understanding dyadic social interactions could be applied to enhance the stability of the social structure promoting animal welfare and to model disease transmission in dairy cattle. This study aimed to identify the impact of different cow characteristics on the likelihood of the formation and persistence of social contacts in dairy cattle. The individual position of the lactating cows was automatically collected once per second for 2 weeks, using an ultra-wideband system on a Swedish commercial farm consisting of nearly 200 dairy cows inside a free-stall barn. Social networks were constructed using the position data of 149 cows with available information on all characteristics during the study period. Social contacts were considered as a binary variable indicating whether a cow pair was within 2.5 m of each other for at least 10 min per day. The role of cow characteristics in social networks was studied by applying separable temporal exponential random graph models. Our results revealed that cows of the same parity interacted more consistently, as well as those born within 7 d of each other or are closely related by pedigree. The repeatability of the topological parameters indicated a consistent short-term stability of the individual animal roles within the social network structure. Additional research is required to elucidate the underlying mechanisms governing the long-term evolution of social contacts among dairy cattle and to investigate the relationship between these networks and the transmission of diseases in the dairy cattle population.