Snakes don't sneak into your basement for the purpose of terrorizing you. A snake in the basement may be seeking a safe place to rest or shelter from inclement weather. It's possible that the creature has tracked prey such as a rat to the location. While its reasons for checking out your property are legitimate by snake standards, most people would rather that they go elsewhere. The best way to keep snakes out of your basement is to make your property unattractive to them.
Eliminate hiding places on your property with good yard-keeping practices. Snakes are stealthy hunters that require sufficient cover for successfully ambushing their prey. Relocate your compost pile to a spot as far from the dwelling as possible. Keep your lawn cut short. Trim low limbs from hedges and shrubs to at least 12 inches above the ground. Weed your gardens often and thoroughly to get rid of unnecessary cover. Remove and dispose of plant refuse immediately.
Move piles of bricks, firewood, boards, or sheet metal as far from your residence as possible. Stack such materials at least 12 inches off the ground. Remove all refuse and debris from your yard immediately. Eliminate unnecessary clutter lying around the yard.
Get rid of animals that snakes actively hunt. Snakes feed mostly upon rodents, birds, lizards and frogs. Some smaller species are insectivores. A snake in your basement may indicate a rodent infestation. Move bird feeders away from the house. If a snake has no prey readily available in an area, it will leave on its own in search of more rewarding hunting opportunities.
Remove containers that hold standing water, which attract small mammals, birds, reptiles and amphibians. These are prey animals that attract snakes to your property. Move birdbaths away from the house. Keep pools and hot tubs covered when they're not in use.
Seal any cracks or holes in the foundation of your house. Cover open septic systems with 1/4-inch mesh hardware cloth. Seal openings around basement windows.