Host specificity is one of the potential factors affecting parasite diversification because gene flow may be facilitated or constrained by the number of host species that a parasite can exploit. We test this hypothesis using a costructure approach, comparing two sympatric pinworm parasites that differ in host specificity – Parapharyngodon cubensis and Spauligodon anolis – on the Puerto Rican Bank and St. Croix in the Caribbean. Spauligodon anolis specializes on Anolis lizards, whereas P. cubensis parasitizes Anolis lizards as well as many other species of lizards and snakes. We collected lizards from across the Puerto Rican Bank and St. Croix, sampled them for S. anolis and P. cubensis and generated nuclear and mitochondrial sequence data from the parasites. We used these data to show that P. cubensis is comprised of multiple cryptic species that exhibit limited population structure relative to S. anolis, which is consistent with our prediction based on their host specificity. We also provide evidence that the distribution of P. cubensis species is maintained by competitive exclusion, and in contrast to previous theoretical work, the parasites with the greatest number of host species also reach the highest prevalence rates. Overall, our results are consistent with the hypothesis that host specificity shapes parasite diversification, and suggest that even moderate differences in host specificity may contribute to substantial differences in diversification.