Why Are Bugs Attracted To Light?

What is it about your porch light or camping lantern that attracts insects? Find out!

Have you ever wondered why insects are drawn to light? It’s a phenomenon that we’ve all experienced – turn on a porch light or a camping lantern, and before you know it, bugs are swarming around it, flying into everything in sight. But have you ever stopped to question why this happens?

Science tells us that this odd phenomenon is caused by phototaxis.

How Phototaxis Affects Insects

A phototactic animal or insect is one that instinctively moves towards or away from light. The bugs that swarm around porch lights are positively phototactic, meaning they are attracted to the light. In contrast, bugs like cockroaches are negatively phototactic and scuttle away when a light is turned on.

Scientists are still uncertain about the exact reason why insects are phototactic. One theory suggests that positively phototactic insects, such as moths, use moonlight as a navigational aid. As they fly by moonlight, the Moon remains in a fixed position overhead. However, when artificial light is switched on, moths mistakenly perceive it as another Moon and become disoriented. They end up fluttering back and forth as they try to keep the “Moon” in their sight.

Another hypothesis proposes that bugs utilize light as an escape route. If a predator were to disturb a bush where insects were resting, they would fly towards the Moon where the predator could not reach them. When artificial lights are switched on, insects seeking refuge are drawn to them due to their greater brightness compared to the Moon.

What The Heck Is A Bugnado?

Why Do Insects Continue Flying Around Lights?

You’d think that at a certain point, a bug confused by an artificial light source would realize its mistake and move on. However, bugs, especially moths, suffer from temporary night blindness, just as people do. Imagine standing in a brightly lit room and someone suddenly turns off all of the lights. You would experience a moment of confusion and almost total blindness as your eyes adjust to the darkness.

A moth’s eyes have light sensors similar to a human’s eyes (the sensor is called an “ommatidium” in insects), but it takes much longer for a moth’s eyes to adjust to darkness after being exposed to a bright light – up to 30 minutes, in fact. So, when a moth swoops back and forth over your campfire or around a lightbulb, the bright light confuses it. At the same time, the moth doesn’t want to fly into the darkness because it would be blind to predators or other dangers for up to half an hour.

What Kinds of Lights Attract Bugs?

While this isn’t the case for all insects, those that are attracted to lights are usually drawn to UV light and white light. That’s why hundreds of bugs will swarm around your bright white fluorescent lights, but only a few will gather around a campfire. If you want to keep bugs away at night, try using yellow or red lightbulbs. These colored lights still attract a few insects, but not nearly as many as white lights do.

This is one reason why bug zappers are supposed to be effective. The white and UV light produced by these devices isdesigned to attract and then zap mosquitoes. Bug zappers do attract a lot of phototactic insects, but only a few mosquitoes. While mosquitoes are somewhat attracted to light, they are even more drawn to food sources, namely you!

If you want an evening outdoors without the bugs, try using yellow bug lights outdoors. Better yet, simply enjoy your evening by the light of the Moon. You can always use one of our natural repellents to keep the biting ones away from you.

Print Friendly, PDF & Email
Head - Facial hair
Amber Kanuckel

Amber Kanuckel is a freelance writer from rural Ohio who loves all things outdoors. She specializes in home, garden, environmental, and green living topics.

Notify of

Oldest Most Voted
Inline Feedbacks
View all comments

Very interesting read. I always wondered why it’s party time for moths on my front porch! I don’t mind though as all these little bugs provide food for nesting birds during the day. Feed them all winter and they will de-bugg your yard all summer.

Alice Cumming

Guess my bug zapper actually did zap more bugs under the pole lite by the shed. Just hanging it off the porch got hardly no bugs. Thanks for the bug info.

jeni simler

I found this article very informative. I am 73 years old and never knew this. Well, you learn something new everyday, right? Keep up the good work!!

Amber Kanuckel

Gary: Yellow lights don’t keep bugs away so much as most bugs simply aren’t attracted to them. If you use them on your porch, you’ll have far fewer insects buzzing around than if you used white lights!

Gary McMichael

Since you won’t accept my comment or question, I will delete Farmer’s Almanac e-mails.

Gary McMichael

Do yellow lights keep bugs away?

Gary McMichael

Bugs are like people, strange.

Sherri Jenkins

I enjoyed reading this….,answers my questions as to why all those moths are coming onto the porch…..


Very interesting read. Thank you

Linda Kelly

I found this very interesting, I’ve wondered this all my life. Thanks ! Now I know why the zappers don’t work, makes sense now.


Very interesting…didn’t know these things and love the new word for me -phototaxis!


Thank you for that information…made great reading

Plan Your Day. Grow Your Life.

Enter your email address to receive our free Newsletter!