Microparasites have a higher evolutionary potential than their hosts due to an increased mutation rate and a shorter generation time that usually results in parasites being locally adapted to their sympatric hosts. This pattern may not apply to generalist pathogens as adaptation to sympatric host genotypes is disadvantageous due to a narrowing of the host range, in particular under strong gene flow among host populations. Under this scenario, we predict that the immune defense of hosts reveals adaptation to locally common pathogen phylotypes. This was tested in four host populations of the pipefish Syngnathus typhle and associated bacteria of the genus Vibrio. We investigated the population divergence among host and bacteria populations and verified that gene flow is higher among host populations than among parasite populations. Next, we experimentally assessed the strength of innate immune defense of pipefish hosts using in vitro assays that measured antimicrobial activity of blood plasma against sympatric and allopatric Vibrio phylotypes. Pipefish plasma displays stronger antimicrobial activity against sympatric Vibrio phylotypes compared to allopatric ones. This suggests that host defense is genetically adapted against local bacteria with a broad and unspecialized host spectrum, a situation that is typical for marine systems with weak host population structure.