The best ways to keep snakes out are trimming grass and shrubs, keeping pest populations under control, using moth balls as a repellent, and catching and removing them. A snake's size and ability to climb makes fences and mechanical barriers ineffective, making maintenance the best option.
Most products made for the purpose of repelling snakes contain chemicals that maybe harmful to pets and small children who come in contact with them. Additionally, most do not seem to be effective over the long term.
Eliminating hiding places goes a long way to making serpents feel unwelcome. Snakes are private animals and really don't want people to see them anymore than people want to see them. Cover up holes in garden sheds, cut shrubs and grass regularly, and keep clutter, firewood and lumber put away to minimize their habitat.
Eliminating food sources is next on the list. Most snakes eat insects, rodents and small animals, such as rabbits and squirrels, when they can catch them. Call a pest control company for help with insects and small pests. Keeping trees trimmed helps to discourage other pests.
The benefits of non-poisonous snakes sometimes outweigh the nuisance they cause. These snakes earn their keep by eating tons of insects, mice and rats. Allowing them to remain may not be possible, however, depending on how populous they are or if small children or pets are present.