There is increasing evidence that host–parasitoid interactions can have a pronounced impact on the microbiome of host insects, but it is unclear to what extent this is caused by the host and/or parasitoid. Here, we compared the internal and external microbiome of caterpillars of Pieris brassicae and Pieris rapae parasitized by Cotesia glomerata or Cotesia rubecula with nonparasitized caterpillars. Additionally, we investigated the internal and external microbiome of the parasitoid larvae. Both internal and external bacterial densities were significantly higher for P. brassicae than P. rapae, while no differences were found between parasitized and nonparasitized caterpillars. In contrast, parasitism significantly affected the composition of the internal and external microbiome of the caterpillars and the parasitoid larvae, but the effects were dependent on the host and parasitoid species. Irrespective of host species, a Wolbachia species was exclusively found inside caterpillars parasitized by C. glomerata, as well as in the corresponding developing parasitoid larvae. Similarly, a Nosema species was abundantly present inside parasitized caterpillars and the parasitoid larvae, but this was independent of the host and the parasitoid species. We conclude that parasitism has pronounced effects on host microbiomes, but the effects depend on both the host and parasitoid species.