One contribution of 14 to a theme issue 'The sociality-health -fitness nexus in animal societies'. The evolution of group living requires that individuals limit the inherent risks of parasite infection. To this end, group living insects have developed a unique capability of mounting collective anti-parasite defences, such as allogrooming and corpse removal from the nest. Over the last 20 years, this phenomenon (called social immunity) was mostly studied in eusocial insects, with results emphasizing its importance in derived social systems. However, the role of social immunity in the early evolution of group living remains unclear. Here, I investigate this topic by first presenting the definitions of social immunity and discussing their applications across social systems. I then provide an up-to-date appraisal of the collective and individual mechanisms of social immunity described in eusocial insects and show that they have counterparts in non-eusocial species and even solitary species. Finally, I review evidence demonstrating that the increased risks of parasite infection in group living species may both decrease and increase the level of personal immunity, and discuss how the expression of social immunity could drive these opposite effects. By highlighting similarities and differences of social immunity across social systems, this review emphasizes the potential importance of this phenomenon in the early evolution of the multiple forms of group living in insects.