What's your first instinct when you see a spider in your vegetable or flower garden? Hopefully it’s not to squish it or spray it with an insecticide.

Although it may be hard to convince an arachnophobe to roll out the welcome mat for these creatures that creep so many people out, spiders are good guys in gardens. That’s because spiders eat the insects that feed on plants and vegetables in the garden, reducing vegetable yields and chewing holes in the leaves and flowers of ornamental gardens.

In fact, spiders are the most numerous land predators on the planet, according to Rod Crawford, curator of arachnids at the Burke Museum of Natural History and Culture on the University of Washington campus in Seattle. Other than some animals in the tropics, spiders eat more insects than any other creature — more than birds, bats or ants, all of which are voracious insect eaters, Crawford points out.

For gardeners, that means you don’t need to get rid of insects by buying an arsenal of chemicals or natural predators such as lady bugs or praying mantis. You can simply allow nature to take its course and leave the spiders in charge of pest control chores.

More to shelter than just webs

The trick to attracting spiders in your garden is providing some protection from the elements.

Think of it this way: If you’re a tiny spider just three millimeters long, having a raindrop fall on you can be a trauma, says Crawford. Even worse for the spider is constant exposure to dry air and sunlight with nothing to drink. That can be fatal.

Now think, for instance, of your vegetable garden. If you have carefully weeded it and have bare ground between plants and rows, chances are that you’ve created a habitat that will attract a host of harmful insects and very few, if any, spiders to eat them.

Luckily, this is easily correctable.

One simple and effective way to create a spider habitat is to add a loose layer of mulch, such as grass clippings and/or dead leaves, between the plants and rows. The best time to do this is early in the season when spiders are dispersing. It’s an environmentally sound way to get rid of any leaves that still may be hanging around from the previous fall. It will also save you the trouble of bagging them up and hauling them to the curb. Mulching will also help retain moisture in the soil and reduce watering costs, especially during hot summer months.

Weeds for spiders

Keep your weeds trimmed to encourage spiders in your garden. Boris Pralovszky/Shutterstock

Another way to attract spiders to the garden, which Crawford said is not as effective as mulching but it will help invite spiders to the garden, is to allow weeds to grow among taller vegetable plants. Don’t panic! Crawford said he doesn’t mean that you should let weeds run amuck. The idea, he said, is to not pull the weeds around some vegetables, such as tomatoes, later in the season. Instead, let them grow but keep them trimmed so they are below the level of the vegetable plants. This method of controlled weed management will provide shade and protection that will encourage an increase in the spider population.

You could also leave a planting pot on its side in the garden. It will create a sheltered micro-habitat for spiders to build webs and trap an unsuspecting meal.

These same methods of creating a spider habitat will also work effectively in ornamental gardens.

Give them a try and give the spiders a home. Even if they give you the willies, they’re doing you a favor — if you can overcome the instinct to squish them or spray them with an insecticide.