Fireflies, also known as lightning bugs, are nocturnal beetles that are actually really beneficial in the garden. They feed on slugs and snails, which can destroy plants (they especially like edibles like beans, lettuce, and tomatoes). They don’t bite, and they’re not poisonous. They also don’t carry diseases like other backyard insects. Fireflies’ glow comes from a chemical reaction inside their bodies that allows them to light up and signal to other fireflies. Unfortunately, some species of fireflies are facing endangerment because of the use of harmful pesticides and loss of habitat. Although pesticides may help to control garden pests, the chemicals simultaneously hurt fireflies in addition to other beneficial garden wildlife such as bees, butterflies, and dragonflies. Besides putting down the pesticides, there are other things you can do to give fireflies the habitat they need.

Add a Pond

Like mosquitoes and dragonflies, fireflies thrive in areas with lots of moisture like ponds, fountains, and marshes. They often mate near the edges of standing and running water—even in puddles and birdbaths. If you’re worried about attracting mosquitoes, start small with a container pond before committing to building an in-ground pond to see what wildlife you attract to your yard.

Grow Your Grass

Since they’re nocturnal, fireflies often hide and rest in grass or other dense plants during the day. By cutting your lawn, you limit where they can safely stay during the day. However, tall grasses are breeding grounds for harmful insects like fleas and ticks. If you’re in an area where these pests pose a problem, just let the grass grow long around the edges of your property and continue cutting down the grass around outdoor living spaces. This is how to attract fireflies while keeping less desirable bugs away.

Start a Wood Pile

Besides giving you a place to stash logs for the bonfire or fireplace, woodpiles and brush piles give fireflies a moist, dark place to lay eggs and rest during the day. Snails, slugs, and worms tend to live on and around piles of debris, so fireflies will also have a food source nearby.

Turn Off Lights

Not only does turning off lights save energy, but it’s also how to attract fireflies to your porch or patio. Artificial light interferes with the glow that fireflies give off to attract mates, so it makes it difficult for fireflies to see each other. They also glow to ward off predators. So you’ll see them better if the lights are off, and they’ll be able to see each other and defend themselves against predators, too.

Plant Groundcovers

We know fireflies prefer shady, moist areas, so choosing plants that provide shade will give them the habitat they need. Groundcovers (not acting as walkways) are great places for fireflies to stay during the day. Dense coniferous trees and shrubs provide plenty of shade, and fallen needles are the right type of debris for them to lay eggs in.

Don’t Keep Them in a Jar

As magical and nostalgic as it is, capturing fireflies and keeping them in a jar can harm them and eventually kill them. Their wings can get damaged, and the lack of oxygen isn’t good for them. They won’t get enough food if you keep them in a container for too long. Enjoy them from a distance and let them fly free. Watching fireflies dance around the yard at night is a magical experience. Providing the right environment can attract more fireflies to your yard and help the firefly population thrive for future generations.