Wolbachia form a group of intracellular bacteria that alter reproduction in their arthropod hosts. Two major phylogenetic subdivisions (A and B) of Wolbachia occur. Using a polymerase chain reaction assay we surveyed for the A and B group Wolbachia in 82 insect species from two temperate host–parasitoid communities (food webs) and a general collection of Lepidoptera caught at a light trap. One host–parasitoid community was based around leaf-mining Lepidoptera, and the other around Aphids. We found that: (i) 22.0% of insects sampled were infected with Wolbachia; and (ii) the prevalence and type (A or B) of Wolbachia infection differed significantly between communities and taxonomic groups. We obtained DNA sequences from the ftsZ gene for the group B Wolbachia found in six leaf-mining species and one of their parasitoids, as well as four of the Lepidoptera caught by a light trap. Taken together, the results of our survey and phylogenetic analyses of the sequence data suggest that host–parasitoid transfer of Wolbachia is not the major route through which the species we have examined become infected. In addition, the Wolbachia strains observed in five leaf-mining species from the same genus were not closely related, indicating that transfer between species has not occurred due to a shared feeding niche or cospeciation.