Though bugs may give you the willies, the vast majority of them are either harmless to us or beneficial to our environment, according to entomology experts at the University of Arizona. But that doesn’t mean we want critters that buzz, fly or have more legs than we do creeping through our homes.

Your first inclination when that long line of ants goes marching through the kitchen may be to reach for a spray can or call an exterminator. But these methods treat only the symptom and not the cause of your bug problem. Plus, some pesticides contain chemicals that could have lasting effects on the kids and pets under your roof, according to the U.S. Department of Housing and Urban Development.

The Environmental Protection Agency (EPA) suggests an environmentally friendly, common sense approach to controlling pests through prevention. Basically, stop enticing and allowing pests to enter your home by cutting off their access to food, water and shelter. Here’s how, according to the Natural Resources Defense Council and the EPA.

Related: Got Pantry Moths? Get Rid of the Infestation Naturally

Inside your home 

Cutting off access to food:

  • Clean up spills with soap and water.
  • Take out the garbage every day and make sure trash cans don’t have food residue in them.
  • Keep all fresh fruit in the refrigerator.
  • Wash dirty dishes in a timely manner — don’t let them sit on the counter or in the sink.
  • Sweep up crumbs, vacuum and mop your floors regularly.
  • Seal all boxes and bags of food, and store all open food such as flour or sugar in a plastic bag or container (and close tightly). 
  • Avoid leaving food in the pet dish overnight.

Cutting off access to water:

  • Drain dishwater from the sink after you finish the dishes.
  • Clean up all spilled liquids and wipe water off the countertops.
  • Fix leaking plumbing and dry out damaged wet areas. 
  • Use a dehumidifier to reduce the amount of moisture in the air, especially in basements.
  • Empty water seeping into trays under houseplants.

Related: 6 Cleaning Mistakes You’re Probably Making

Cutting off access to shelter:

When it comes to shelter, focus on sealing up entry points. Bugs can find their way into your home through the tiniest of openings. Look through your house for any of these issues:

  • Make sure windows, doors and ventilation openings in the attic and basement have screens or a wire mesh covering. 
  • Check to see if any light is showing underneath exterior doors and garage doors. If so, install a threshold, door sweep or rubber weather stripping seal on the base of the door. Make sure the seal comes in contact with the floor.
  • Fill cracks and holes around windows and doors and in drywall, brick and siding. Use caulk, silicone or a construction material that matches the existing structure.
  • Seal all utility openings where pipes and wires enter the home.
  • Keep all doors shut when not in use, or install a self-closing screen door.

Related: How to Get Rid of Bedbugs

Outside your home

Eliminate clutter with a general yard clean up. Remove leaves and grass clippings that might be bunched up against the foundation or laying on window ledges. Trim weeds and rake back mulch or pine straw that might be piled above the foundation.

Cut back all tree limbs and shrubs. Keep them at a distance of at least 18 inches from the house exterior, the EPA advises. Stack firewood away from the house so pests can’t climb up it to get in. 

Also, work on eliminating outdoor breeding sites. Clean up pet droppings that attract flies and spread bacteria. Don’t let litter or garbage pile up outside, and keep trash in a sealable trashcan. Make sure all water drains away from the home, and remove standing water, which can be a breeding ground for mosquitoes and other pests.

Finally, if you have a garden, flowerbed or fruit trees, keep them healthy and thriving. According to the EPA, healthy plants resist pests better than weak plants.

All of these steps will reduce the need for pesticides and help you keep the bugs where they belong — outside.

Related: 30 Environmentally Friendly Cleaning Products

Brian Fourman is a stay-at-home dad who writes about home safety and personal finance.