The best way to keep snakes away from a yard is to remove organic debris, such as overgrown bushes or grass piles. Sealing small holes in house and patio foundations removes hiding places and potential food sources for the snakes, which helps keep them at bay.
Eliminating small rodents living in the yard, such as moles, mice, rats and rabbits, forces snakes to look elsewhere for food and a place to live. Overgrown yards must also be kept in check; short grass and trimmed bushes can keep both snakes and their potential prey away. Removing wood and compost piles by storing them in closed containers can get rid of another potential snake habitat. Snakes also choose to live in cracks or spaces underneath concrete stairs to keep warm, so filling in these gaps makes the yard less hospitable.
Another way to deter snakes is to build a solid wall or gapless fence around the yard’s perimeter, that sinks 2 to 4 inches into the ground and stands at least 4 feet high. Gates need to sit flush with the ground and be kept closed to keep snakes out effectively. Lighted walkways in gardens can also act as deterrents for snakes. Excessive lawn watering needs to be avoided to prevent attracting snakes that prey on small frogs, slugs and worms.