Among the wide variety of resistance mechanisms to parasitism, the transgenerational transfer of immunity from mother to offspring has largely been overlooked and never included in evolutionary or coevolutionary studies of resistance mechanisms. Here we study the evolution and coevolution of various resistance mechanisms with a special focus on maternal transfer of immunity. In particular we show that maternal transfer of immunity is only expected to evolve when cross immunity is high and when the pathogens have an intermediate virulence. We also show that the outcome of the coevolution between various resistance mechanisms depends critically on the life span of the host. We predict that short-lived species should invest in avoidance strategies, whereas long-lived species should invest in acquired resistance mechanisms. These results may help understanding the diversity of resistance strategies that have evolved in vertebrate species. Our framework also provides a general basis for the study of the evolution of other transgenerational resistance mechanisms.