Aroma is a vital attribute of dairy products. This study employed a combination of human sensory evaluation and instrumental analysis to study the effect of two different pre‐sterilisation processes (A and B) on the odour characteristics of milk and long shelf‐life yoghurt. The results from the sensory evaluation and electronic nose analysis indicated that the pre‐sterilisation process significantly influences the aroma profile and compounds of the samples. Stir bar sorptive extraction coupled with comprehensive two‐dimensional gas chromatography−olfactometry−mass spectrometry (SBSE‐GC × GC−O−MS) was applied to identify the aroma‐active compounds present. Aldehydes and ketones emerged as the most abundant aroma‐active compounds. Quantitative analysis showed variations in the concentrations of aroma‐active compounds. For example, higher concentrations of hexanal, butanoic acid and hexanoic acid were observed in long shelf‐life yoghurt and milk produced by process B than process A, while higher concentrations of nonanal, 2,3‐butanedione and 3‐hydroxy‐2‐butanone were detected in products from process A than process B. Initial odour activity values provided insight into the contribution of aroma‐active compounds to the overall odour perception. Based on the results of aroma recombination, omission and spiking experiments, 13 and 11 key aroma‐active compounds were identified in long shelf‐life yoghurt and milk, respectively. These compounds, including 2,3‐butanedione, 2,3‐pentanedione, 2‐heptanone, 2‐undecanone, hexanal, octanal, nonanal, decanal, furfural, butanoic acid, hexanoic acid, 3‐hydroxy‐2‐butanone and styrene, can serve as potential indicators for determining odour differences between long shelf‐life yoghurt (milk) samples. Consequently, they offer a chemical basis for manufacturers to make informed decisions regarding production processes.