Abstract Wolbachia is a genus of endosymbiotic bacteria that is widespread among arthropods. It is responsible for manipulating various host phenotypes and often affects their host's fitness. We used the generalist parasitoid wasp Nasonia vitripennis and its endosymbiont Wolbachia to test whether and how Wolbachia affects the fitness of N. vitripennis by comparing the host preference and parasitization rate of cured and uncured N. vitripennis lines. We reared four genotypes of wasps, each with Wolbachia infection or cured of infection, using two different host species, namely Calliphora vomitoria and Lucilia sericata, for 3–4 generations before measuring their host preference because rearing history has previously been shown to influence host preference in N. vitripennis. We found that all experimental groups significantly preferred C. vomitoria pupae. Neither rearing history nor Wolbachia infection altered N. vitripennis female's innate host preference. Furthermore, we investigated whether Wolbachia infection may affect Nasonia's parasitization rate, offspring production and sex ratio using parasitization assays of two wasp genotypes with and without Wolbachia infection. Our results show that uncured wasps have fitness costs of harbouring Wolbachia in terms of reduced parasitization rate and offspring production in one of the host genotypes and reduced proportion of female offspring in the second host genotype tested, highlighting the context‐dependency of host–endosymbiont relationships.