Host immunity will result in increased homozygosity at immunogenic loci if they encode products that elicit allele-specific immune responses. This increased homozygosity can be detected by comparison to ‘neutral’ (i. e. unselected) loci in the same genome which act as controls for the various epidemiological factors, such as biting rate, which affect homozygosity. Numerical results suggest that homozygosity should be 20 to 500 % higher at immunogenic loci, a result which is robust to changes in host death rate and the degree of linkage between the immunogenic and neutral loci. The same logic applies to loci which encode drug resistance: treated individuals with resistant infections will transmit zygotes homozygous for the resistance allele. It is argued that this increased homozygosity at putative immunogenic loci can act as a diagnostic feature to test using field data. The method also serves as a potentially very powerful method of identifying immunogenic and drug-resistant loci in laboratory studies of species such as the murine malaria Plasmodium chabaudi.