Small mammals have a number of means to detect and avoid predators, including visual, auditory and olfactory cues. Olfactory cues are particularly important for nocturnal or fossorial species where visual cues would not be as reliable. The Cape ground squirrel (Xerus inauris) is a semi‐fossorial, diurnal mammal from southern Africa. Cape ground squirrels encounter multiple species of predatory snake that pursue individuals underground where visual and social cues are limited. We assessed whether Cape ground squirrels use odours to discriminate between snakes by presenting a non‐venomous snake, a venomous snake and a control odour collected on polyethylene cubes to 11 adult female squirrels from 11 different social groups. Cape ground squirrels responded by inspecting the cube, displaying snake harassment–associated behaviours and decreasing time spent in close proximity to snake odours when compared with a control. They also displayed discrimination between two snake species by increasing the frequency of cube inspection and increasing harassment behaviours with venomous snake odours when compared with non‐venomous snake odours. We conclude that Cape ground squirrels respond with snake‐specific antipredator behaviours when presented olfactory cues alone. Olfactory discrimination may be maintained by the decreased utility of other methods of predator detection: sight and group detection, in below‐ground encounters.