You can do your bit for insects by growing lots of foliage in your garden, a study has found.
Ground-dwelling insects, such as beetles, generally benefit from dense vegetation, including evergreens.
Spiders, however, prefer a bit of bare earth - such as a bald patch in a lawn or a sparse flower bed.
Alarm bells are ringing about a global decline in insects. Recent studies suggest populations are plummeting, due to nature loss and pesticides.
Against this backdrop, new research, published in Biodiversity and Conservation, investigated how plants can best support all forms of insect life.
"The main message is the more foliage there is, the more invertebrates you will have in your garden," said Andrew Salisbury, Royal Horticultural Society principal entomologist.
"Gardeners can make a lot of difference just by growing stuff in their gardens, taking it a little bit easy on being too tidy and avoiding the use of pesticides wherever possible."
While dense planting is good for insects in general, one particular group of invertebrates, the spiders that live on the ground rather than spinning webs, do better when there are a few bare patches.
"It might be that with less foliage, particularly at the ground level - they are able to move more freely and hunt more freely," the entomologist said.
The researchers looked at how invertebrates thrive in different planting combinations, including native, near-native and exotic species.
They concluded that growing a wide variety of plants was important, with a bias towards native and near-native species. And evergreen plants such as holly, Christmas box and pittosporum might have a special role to play for invertebrates, providing shelter during the winter months for the likes of ladybirds, springtails and ground beetles.
Tips to support invertebrates in gardens
- Let planting fill out, but keep some areas sparser to help specific groups, notably spiders
- Use plenty of native and near-native plants to support the greatest number of ground-active invertebrates
- Try to include some evergreens in your garden to give shelter to invertebrates
- The greater the variety of plants in a garden, the richer the diversity of invertebrates it will support.
Follow Helen on Twitter.