Parasitoids lay their eggs in or on a host, usually another insect. During foraging, parasitoids can encounter insects that differ in terms of host suitability and quality. At one extreme end of this spectrum are non-hosts that are unsuitable for offspring development. Non-hosts are generally ignored but parasitization does occur and occasionally also results in egg deposition. Here, the authors investigate how oviposition in a non-host influences subsequent foraging behaviour of a parasitoid and whether this is mediated by learning. The study system consists of the endoparasitoid Cotesia glomerata and the presumed non-host caterpillar Mamestra brassicae. In the presence of Pieris brassicae hosts and/or their traces (frass), C. glomerata inserted its ovipositor into M. brassicae caterpillars. Eggs were deposited, but all eggs disappeared within 96 h, confirming the non-host status of M. brassicae. In contrast to the expectation, there was no memory retention after oviposition in a non-host and parasitoids did not alter their behaviour with respect to non-host contacts and ovipositions. Instead, C. glomerata became more motivated to forage on a non-host infested leaf. The authors propose that egg deposition in non-hosts by C. glomerata might be due to their high egg load, which is thought to make parasitoids less selective on host quality, especially when they have few reproductive opportunities. In such cases, fitness costs to individual females are low. Egg deposition in non-hosts might ultimately lead to host range expansion if parasitoids overcome the defence response of non-hosts over evolutionary time.