Frank FichtmA14ller / Getty Images

Snakes prey on rodents and insects and are a vital part of the ecosystem.

But for many homeowners, snakes are not welcome in the yard.

Some snakes will bite, and bites can be harmful.

Snake in the grass

Frank Fichtmüller / Getty Images

So, it’s understandable to want to know how to keep snakes out of your yard.

Learn how to keep snakes out of your yard and how to get rid of snakes that wander in.

Maintain a Dry Yard

Keep excess water out of your yard.

Avoidbuilding garden ponds, look intoyard drainage methodstodrain standing water, and move drained gutter water beyond the home.

Snakes are attracted to water, and like all animals, they need water to survive.

Want more gardening tips?

Snakes depend on high grass and bushy foliage for hiding.

Remove Food From the Yard

Keep all types of food out of the yard.

Feed pets indoors, remove birdseed, and avoid feeding squirrels.

Snakes may be attracted to any key in of food left in the yard.

Remove Burrowing Areas

Move stacked firewood far away from the house.

Remove piles of stones.

For large joints between masonry structures, fill the gaps with mortar.

Large boulders are anothertype of landscaping rockthat attracts snakes.

Bark-jot down mulch used for landscaping provides a damp, welcoming environment for snakes.

Seal Foundation Cracks

Search for cracks in the house’s foundation and along the rim joist.

Fill the cracks with concrete crack filler.

Erect Snake-Proof Fencing

Create an exclusionary boundary around the property to prevent snakes from entering.

Use quarter-inch square metal hardware cloth (wire), 48 inches high and staked every six feet.

Tilt the wire 30 degrees toward the exterior.

Be sure to overlap the cloth by several inches when seaming it.

Bury the cloth six inches into the ground.

Add Lava Rock Beds

Create a boundary around your house filled with lava rocks.

While not a total barrier to snakes, some evidence suggests snakes tend to avoid sharp rocks.

Commonly used forstone fire pits, lava rocks are also axeriscaping ideafor gardening in drier climates.

Snakes become entangled in the traps, hampering movement.

But there are a few methods of capturing and removing snakes in your yard or home.

Snakes, the ecosystem, and us: its time we change.

The George Institute for Global Health.

World Health Organization (WHO).

Eight myths about snakes…and some common misconceptions.

Museums Victoria, The State of Victoria, Australia.

Snake Prevention and Management.

University of Illinois Urbana-Champaign, College of Agricultural, Consumer & Environmental Sciences.

12 Ways to Stop Snakes From Slithering Into Your Yard.

Utah State University Extension.

Snakes and Their Control.

Texas A&M Agrilife Extension.

Fish and Wildlife Service.

University of Nebraska, Lincoln.

What to do about snakes.

The Humane Society of the United States.

Wildlife Services Tech Note - Snake Repellents.

Animal and Plant Health Inspection Service, U.S. Department of Agriculture (USDA).

Tips on Helping Snakes Leave Your Home.