Parasites and parasitoids control behaviors of their hosts. However, the origin of the behavior evoked by the parasitic organism has been rarely identified. It is also not known whether the manipulation is universal or host-specific. Polysphinctine wasps, koinobiont ectoparasitoids of several spider species that manipulate host web-spinning activity for their own protection during pupation, provide an ideal system to reveal the origin of the evoked behavior. Larva of Zatypota percontatoria performed species-specific manipulation of theridiid spiders, Neottiura bimaculata and Theridion varians, shortly before pupation. Parasitized N. bimaculata produced a dense web, whereas parasitized T. varians built a cupola-like structure. The larva pupated inside of either the dense web or the cupola-like structure. We discovered that unparasitized N. bimaculata produce an analogous dense web around their eggsacs and for themselves during winter, while T. varians construct an analogous 'cupola' only for overwintering. We induced analogous manipulation in unparasitized hosts by altering ambient conditions. We discovered that the behavior evoked by larvae in two hosts was functionally similar. The larva evoked protective behaviors that occur in unparasitized hosts only during specific life-history periods.