The composition of the volatile fraction of yoghurts made from cows’, buffaloes’, ewes’ and goats’ milks was investigated during the 28 days of storage at 4 °C using solid‐phase microextraction technique (SPME) and gas chromatography coupled to mass spectrometry analysis (GC/MS). A total of 34 volatile compounds were identified in yoghurts during their storage at 4 °C, including aldehydes, ketones, alcohols, esters, acids, terpenes, hydrocarbons and sulphur compounds. In this study, acetaldehyde, diacetyl and acetoin, considered as the major compounds of yoghurt, were detected in all yoghurts.