Short answer: Snakes come for food, water and shelter. Keep them away by getting rid of rodents and hiding spots, closing gaps under gates and in walls, and adding snake fencing if you back onto open desert. Repellents and plants don't hold up in testing.
1. Take away what draws them
- Control rodents. They're the main reason snakes visit a yard
- Move woodpiles and clear junk, brush and debris where snakes and rodents hide
- Keep pet food and birdseed cleaned up
- Fix leaks and standing water
2. Close the routes into the yard
Scottsdale Fire recommends gates that sit snug against the ground and a solid barrier, buried at the base. For snake fencing, the Arizona Poison and Drug Information Center lists a minimum height of 36 inches above the nearest climbable surface, gaps no bigger than 1/4 inch, and a buried bottom edge.
- Gaps under gates and at the hinge side
- Drain openings in block walls
- Places where two kinds of fence meet
- Plants, rocks or furniture next to the wall that a snake can use
See does snake fencing work? and the snake fence checklist.
3. Keep them out of the house and garage
- Seal the garage door's bottom and side gaps
- Add door sweeps
- Close gaps around pipes and utility lines
What doesn't work
Granular repellents, mothballs, ultrasonic stakes and so-called repellent plants don't hold up. A 2021 field study found none of five common repellents worked better than plain water. See do snake repellents work?.
If one shows up
Stay at least 6 feet away and don't try to kill or catch it. If you and your pets are safe, it will usually move on. Scottsdale Fire lists volunteer relocation groups: the Phoenix Herpetological Society (602-550-1090) and the Arizona Herpetological Association (480-894-1625). See rattlesnake in the yard.
Common questions
What is the best way to keep snakes away?
Remove rodents and cover, then physically block the yard with snake fencing and tight gates. Barriers work where repellents don't.
What smell keeps snakes away?
None reliably. In a 2021 field study, naphthalene (mothballs), a commercial repellent and geraniums all did no better than water.
Sources
- Scottsdale Fire: Snakes and bees safety
- Arizona Poison and Drug Information Center newsletter
- University of Pretoria repellent study (2021)
- Arizona Game and Fish Department (2026)