For many important pathogens, mechanisms promoting antigenic variation, such as mutation and recombination, facilitate immune evasion and promote strain diversity. However, mathematical models have shown that host immune responses to polymorphic antigens can structure pathogen populations into discrete strains with nonoverlapping antigenic repertoires, despite recombination. Until now, models of strain evolution incorporating host immunity have assumed a randomly mixed host population. Here, we illustrate the effects of different host contact networks on strain diversity and dynamics by using a stochastic, spatially heterogeneous analogue of this model. For randomly mixed populations, our model confirms that cross-immunity to strains sharing alleles at antigenic loci may structure the pathogen population into discrete, nonoverlapping strains. However, this structure breaks down once the assumption of random mixing is relaxed, and an increasingly diverse pathogen population emerges as contacts between hosts become more localized. These results imply that host contact network structure plays a significant role in mediating the emergence of pathogen strain structure and dynamics.