Genetic variation for disease resistance within host populations can strongly impact the spread of endemic pathogens. In plants, recent work has shown that within-population variation in resistance can also affect the transmission of foreign spillover pathogens if that resistance is general. However, most hosts also possess specific resistance mechanisms that provide strong defenses against coevolved endemic pathogens. Here we use a modeling approach to ask how antagonistic coevolution between hosts and their endemic pathogen at the specific resistance locus can affect the frequency of general resistance, and therefore a host’s vulnerability to foreign pathogens. We develop a two-locus model with variable recombination that incorporates both general resistance (effective against all pathogens) and specific resistance (effective against endemic pathogens only). With coevolution, when pathogens can evolve to evade specific resistance, we find that the regions where general resistance can evolve are greatly expanded, decreasing the risk of foreign pathogen invasion. Furthermore, coevolution greatly expands the conditions that maintain polymorphisms at both resistance loci, thereby driving greater genetic diversity within host populations. This genetic diversity often leads to positive correlations between host resistance to foreign and endemic pathogens, similar to those observed in natural populations. However, if resistance loci become linked, the resistance correlations can shift to negative. If we include a third linkage-modifying locus in our model, we find that selection often favors complete linkage. Our model demonstrates how coevolutionary dynamics with an endemic pathogen can mold the resistance structure of host populations in ways that affect its susceptibility to foreign pathogen spillovers, and that the nature of these outcomes depends on resistance costs, as well as the degree of linkage between resistance genes.