Using various three‐dimensional traps alone and in combination with the onion volatile, dipropyldisulphide (Pr2S2), we found that visual behaviour of female onion flies, Delia antiqua (Meigen), varied with the ‘visual context’ (background composition and trap spacing) in which traps were presented and the females' reproductive state (mated vs. unmated). Against a background of real onions, females alighted more frequently on spherical than cylindrical traps, and white than green spheres, but females responded equally to white and green cylinders. In an onion field, baiting traps with Pr2S2 significantly increased female response to white over green traps, but had no influence on their response to trap shape. When traps were spaced 10 m apart and against a background of bare soil, females orienting to Pr2S2 baits alighted more frequently on vertical than horizontal traps, but shape and spectral reflectance were insignificant. However, when traps were spaced 0.25 m apart, females orienting to Pr2S2 baits alighted more frequently on cylinders than spheres. Mated females alighted more frequently on green than white cylinders, but unmated females responded to cylinders independent of spectral reflectance. When located 20 m downwind from Pr2S2 baits, mated females alighted on green cylinders significantly more often than unmated females. Response to traps mimicking onion plants suggests that ovipositional host‐finding in female onion flies is dominated by olfactory responses at long range (several metres) and by visual cues at short‐range (ca. 1 m). The view that host location by female onion flies is a hierarchical response pattern mediated by multiple sensory modalities and modified by resource level (habitat) and reproductive status, is discussed.