Abstract Horse and cow dung were tested as substrates for oviposition by the stable fly Stomoxys calcitrans (L) (Diptera: Muscidae) in laboratory cages. Odour alone from either horse or cow dung was sufficient to attract flies for oviposition. This was confirmed in wind tunnel experiments, where both horse and cow dung were shown to attract gravid stable flies. However, when S. calcitrans was offered a choice between these two oviposition substrates, flies always chose horse dung over cow dung, both when allowed to contact the substrates and when relying on dung odour alone. Analyses of volatile compounds emanating from horse and cow dung by gas chromatography linked antennogram recordings from S. calcitrans antennae revealed no differences in the chemostimuli released from the two substrates. The predominant chemostimulant compounds in both substrates were carboxylic acids (butanoic acid), alcohols (oct-1-en-3-ol), aldehydes (decanal), ketones (octan-3-one), phenols (p-cresol), indoles (skatole), terpenes (β-caryophyllene) and sulphides (dimethyl trisulphide). Higher levels (20–40 p.p.m.) of carbon dioxide were recorded over horse dung compared with cow dung, a factor that may contribute to the preference exhibited by S. calcitrans for this substrate for oviposition.