Genetic diversity at community, population and individual levels is thought to influence the spread of infectious disease. At the individual level, inbreeding and heterozygosity are associated with increased risk of infection and disease severity. Host genotype rarity may also reduce infection risk if pathogens are co-adapted to common or local hosts, but to date, no studies have investigated the relative importance of genotype rarity and heterozygosity for infection in a wild, sexually reproducing vertebrate. With beak and feather disease virus (BFDV) infection in a wild parrot (Platycercus elegans), we show that both heterozygosity and genotype rarity of individual hosts predicted infection, but in contrasting ways. Heterozygosity was negatively associated with probability of infection, but not with infection load. In contrast, increased host genotype rarity was associated with lower viral load in infected individuals, but did not predict infection probability. These effects were largely consistent across subspecies, but were not evident at the population level. Subspecies and age were also strongly associated with infection. Our study provides novel insights into infection dynamics by quantifying rarity and diversity simultaneously. We elucidate roles that host genetic diversity can play in infection dynamics, with implications for understanding population divergence, intraspecific diversity and conservation.