In the field, plants are attacked by several herbivore species both simultaneously and in isolation. Spatial variation in damage to plants by different herbivores may affect the search behaviour of parasitoid wasps, but the consequences of this variation for hosteparasitoid interactions are still little understood. We examined the effects of multiple herbivory on the search behaviour of the parasitoid Cotesia glomerata. Reduced parasitism was found in a field tent experiment, when both the host small cabbage white, Pieris rapae, and the nonhost cabbage moth, Mamestra brassicae, were present on Brassica oleracea plants. When hosts and nonhosts occurred on the same or neighbouring plants, this reduction in parasitism was similar, but the underlying behavioural mechanisms were different. In wind tunnel bioassays, parasitoids were equally attracted towards plants infested by the two herbivore species but were more attracted to plants with both herbivore species than to plants with only one. Differences in arrival tendencies therefore could not explain the reduced parasitism in the tent experiment with mixed infestations. Experiments showed that parasitoids readily left nonhost patches, whereas leaving tendencies from mixed patches of hosts and nonhosts were the same as from pure host patches. Therefore, reduced leaving tendencies and reduced host encounters explained the lower parasitism rate in mixed infestations in the tent experiment. Our results show that the spatial context in which hosts and nonhosts attack plants determines the foraging efficiency of parasitoids, with consequences for hosteparasitoid interactions.