Phytophagous insects are capable of detecting and locating suitable hosts, which emit volatile compounds. Polyphagous species appear to have a complex olfactory strategy given that their numerous hosts have diverse emission profiles. In particular, their hosts' volatile emissions share some of the same compounds, providing chemical bridges between them. However, the behavioural plasticity observed in insect host selection suggests that other volatiles have a complementary role. Here we explore how polyphagous insect specialization to detect and discriminate between hosts has driven their chemical selectivity. We predicted in silico a functional trade-off between these two functions, using a neuronal model of an olfactory system. The volatile emissions of intact or mechanically damaged fruit from 28 different species were fed into the model and analysed using gas chromatography coupled with mass spectrometry. Using triple point electroantennography and a behavioural assay, we studied the olfactory response of Tephritidae fruit fly species that oviposit on fruit. We observed experimentally two predictions of our model for host discriminating olfactory systems: the olfactory responses of eight species were negatively correlated with the compound's degree of sharedness among fruit emissions; female Bactrocera dorsalis showed a behavioural preference for non-shared over shared fruit compounds. A dose-dependent switch in the fly's preference confirmed the ecological importance of shared fruit compounds. Thus, we propose that insect olfactory systems are chemically tuned to detect suitable hosts and accurately discriminate between them.