Porch lights. Campfires. Street lights. It seems like the minute night-lights come on, swarms of insects swoop in. Despite the threat of overheating next to the bulb or, worse yet, being sizzled in a bug-zapper, moths and their ilk just can’t seem to help themselves. What could account for such odd, sometimes self-destructive behavior? Here are the reasons insects are attracted to light.

Transverse orientation

Person holding a lantern outside at night
Credit: EvgeniiAnd/ Shutterstock

Imagine a ship — before GPS — sailing across the ocean. There are no buildings, monuments, landmarks, or street signs to help the sailors navigate the endlessly uniform sea. The only thing that they can rely on to maintain the proper course is the North Star.

Moths and other nocturnal flying insects use a similar approach to navigate their surroundings. Instead of the North Star, they use the moon. The moon is a bright, easy-to-see light that stays in the same position no matter where you are. Insects use the position of the unchanging light to help them fly upright and maintain a straight course. This is called transverse orientation.

Invention of the lightbulb

For millions of years of moth evolution, the moon was the only source of light in the night sky, which made it a pretty reliable navigational instrument. In 1879,  Thomas Edison changed all that with a creation called the lightbulb.

While it might have been a great moment for humans, it was a dark day (pun intended) for moths and nocturnal insects everywhere. Now, instead of just one moon, there were hundreds. If a moth uses a streetlamp for navigation and tries to keep a straight line based on its angle, it will end up flying in circles toward it, which is exactly what happens. It’s like if you had several GPS devices in your car all running simultaneously, and they were all telling you different instructions.

Lightbulbs are great sources of heat

Bright lightbulb shines at night, attracting moths and insects to the light
Credit: AnastasiaPash/ Shutterstock

Not all bugs rely on transverse orientation to get around, but they’re still strangely attracted to lights. The nighttime air can be chilly, and bugs get cold too! Many insects are attracted to lightbulbs because of the heat produced. It’s basically the bug equivalent of sitting on a peaceful beach — hundreds of other beachgoers included.

Other insects are attracted to heat for a different reason. Mosquitoes, for instance, are attracted to heat because they feed off of warm-blooded animals. When they get to the light for a hot meal, though, they’re sadly disappointed.

Blinded by the light

Once the insect hits the lightbulb, you’d think they’d realize it’s not the moon or a tasty treat and fly somewhere else, right? Experience tells us that's not what happens, though. Typically, when a moth flies into an artificial light source, it hits the glass and then proceeds to fly circles around the light for the rest of the evening. One theory is that they’ve literally been blinded by the light.

Just like any other animal, moths don’t want to be eaten by predators. But, when they fly into a light source, their eyes try to adjust to the brightness. When they realize they’ve been duped, they turn around to fly away, but since their eyes are now adjusted to the light, they can’t see in the dark anymore! Flying blind is an easy way to get eaten by a predator, so instead of wandering around in the dangerous darkness, they choose to fly back to the safety of the light where they can see. Thus, for the rest of the night, they’re stuck circling the fake moon.

Lights that don’t attract insects

Up close view of LED lightbulb with warm yellow hue
Credit: nikkytok/ Shutterstock

While certain insects are attracted to light, not all light is equally as appealing. Traditional incandescent white lights are the most attractive for bugs. They give off the most light and heat of any bulb.

If you’d like your outdoor picnic to remain bug-free, try using a warm-colored LED light. They aren’t as bright as the standard white bulbs and don’t give off much heat. One study found that yellow-hued LED lights were the best for not attracting insects.