Many parasitic nematodes have an environmental infective stage that searches for hosts. Olfaction plays an important role in this process, with nematodes navigating their environment using host-emitted and environmental olfactory cues. The interactions between parasitic nematodes and their hosts are also influenced by the olfactory behaviors of the host, since host olfactory preferences drive behaviors that may facilitate or impede parasitic infection. However, how olfaction shapes parasite-host interactions is poorly understood. Here we investigated this question using the insect-parasitic nematode Howardula aoronymphium and its host, the mushroom fly Drosophila falleni. We found that both H. aoronymphium and D. falleni are attracted to mushroom odor and a subset of mushroom-derived odorants, but they have divergent olfactory preferences that are tuned to different mushroom odorants despite their shared mushroom environment. H. aoronymphium and D. falleni respond more narrowly to odorants than Caenorhabditis elegans and Drosophila melanogaster, consistent with their more specialized niches. Infection of D. falleni with H. aoronymphium alters its olfactory preferences, rendering it more narrowly tuned to mushroom odor. Our results establish H. aoronymphium-D. falleni as a model system for studying olfaction in the context of parasite-host interactions.