How to Get Rid of Bugs Attracted to Light

When you switch on the lights at night on the porch, patio, or indoors, insects will fly and head straight to it. Flies fly around electric lights, fires, and other glowing things because light rays in the dark confuse their natural instincts.

Any insect that flies around a light bulb has positive phototaxis. They are drawn towards any source of light in the dark. To keep flies away from the lights, use yellow or orange LED bulbs with low ultraviolet rays. You can also install a bug zapper near the lights to kill flying insects.

White lights that are extra bright attract the most bugs because their rays can penetrate the dark and cover a wide area. On a dark night, insects will easily pick the rays of a white fluorescent or bright incandescent light and they will be attracted to it in large numbers.

Why do Insects Like Light?
How to get rid of insects around lights

Causes: Why are bugs attracted to lights?

Bugs that fly around light are nocturnal. This means that they only come out at night and many are migratory. In order to stay on track while traveling long distances, they want to stay at a specific angle with respect to the moon.

1. Navigation

Insects that are drawn to light are known to be positively phototactic. An explanation behind their behavior is that when there is no light in the wild, these insects use the moon to navigate at night.

These flies and insects are attracted to light at night because they mistake a point of light they find in the dark (like an electric light bulb) for the moon. This explains why certain insects I.e moths tend to fly around the light bulbs in circles.

Once they reach the glowing object (light bulb) that they think is the moon, they keep drastically changing their angles to the light source, which practically throws them into circles. However, not all insects that are attracted to light use the moon to navigate in the dark.

2. Obstacle free path

Another reason why bulbs attract bugs at night is that light can also be a sign of an unobstructed path. For the insects, this is the best route to follow especially if they are trying to escape a predator. 

In this case,  if they feel a light ray is a sign of an obstacle-free area, they will want to head straight for it. This is why they end up bumping into the bulb and falling down. Once they are up again, they head straight back to the lights because they are not intelligent.

3. Source of food

It is also a fact that bugs that fly at night are good at detecting ultraviolet light. Their ability to pick UV lights is what helps them in finding flowers so that they can feed on the sweet nectar.

When the sun rays are reflected on the petals, the ultra-violet rays (UV) bounce back from the petals and this is what will get the insect’s attention. When combined with the sweet smell that the nectar produces, they will be able to find them very fast.

In most cases, even before they pick the smell, tey are attracted by the the UV light from the petal’s reflection. This is why they are also attracted to UV light because they always associate it with flowers.

Generally, flying insects are attracted to light because they instinctively think it’s something they want like a source of food or a clear path with no obstacles especially when they are escaping from a predator. 

This also explains why insects might fly straight into a bug zapper or a fire because they don’t expect the light source to be so close. They move with speed and before they realize it, they crush into the zappers.

4. Warmth

Lights attract a lot of flies especially in the cold seasons when there is no moon. Most flying bugs hate it outside when the weather is cold. They will try and find warm areas because bulbs produce heat constantly.

Halogen bulbs produce a lot of heat because that is what they use to generate light. After some time, the area around these bulbs will become warm and this will attract a lot of flying insects around them.

Why do flies fly around light that is off?: Flies will only be attracted to lights that are off when they are still hot or warm after staying on for a while. When the lights are switched on, they produce a lot of heat. When you turn them off, they will take some time to cool.

How to get rid of bugs attracted to light

The first step to get rid of insects around the lights at night is to change the bulbs. Avoid using bulbs and fluorescent lights that are very bright. Instead, go bulbs that have a yellowish or orange tint on them. Close the windows and doors when the lights are on to keep insects away.

1. Bug zappers

To kill insects on your patio or porch lights, install a bug zapper in strategic places. Bug zappers are a sure way of trapping and killing insects around the lights. They have unique ultraviolet rays that will get the insects’ attention very fast. When the bugs approach it, they will be electrocuted to death.

Some zappers are known to be loud and can really be annoying. Thanks to advanced technology and modern evolution, you can find silent bug zappers.

Bug zappers can be comfortably used indoors and outdoors. They are a sure way of killing flying bugs around the bulbs without any sound. The portable ones can also be used when camping in a bug-infested area.

2. Citronella candles

The advantage of lighting citronella candles near the lights at night is that it will also keep biting insects like mosquitoes away. However, you can only use this indoors since candles deplete very fast when out in the wind. Normal citronella candles should be used indoors.

If you want to relax outdoors at night and there are insects around because of the lights, use the repel triple wick citronella candle. Those can be used at night to repel flying insects around the light on the porch or the patio. They are designed to last long (up to 40-50 hours). They are effective with a good natural smell in the air.

3. Incense sticks

There are incense sticks that repel flying bugs.It is recommend to use them indoors because when out doors, incense sticks will burn out very fast. The fumes which are meant to repel the insects will be carried away by wind.

When getting incense sticks for flies around the lights, ensure you read the labels so that you pick the ones that are plant-based. If you can get those that are free from DEET and are plant-based, they will repel the bugs while you and your household will be safe.

You can also go for those that contain rosemary as part of their ingredients. When you burn them, they will leave the house with a nice refreshing scent as they repel the insects. This will help you use fewer air fresheners which is an added advantage for you.

4. Change the bulbs

The best way to keep insects away from the porch, patio, or indoor lights is to use yellow bug repellent lights. LED bulbs with low watts and lights that have minimum UV rays with low heat will not attract insects.

Insects see lights in different ways but most of them will not get to see LED lights with low UV. Those that are attracted to lights with low UV will be in small numbers which can be easily managed.

Here is a table that shows lights that attract bugs vs Insect repellent light bulbs:

 Lights that attract insectsInsect repellent light bulbs
1. While florescentDichroic yellow lights
2.Neutral LED Bulbs(CFL) Yellow compact florescent
3.Bright Blue LEDHalogen bulbs with low watts
4.Mercury vaporOff white LED
5.White incandescentSodium vapour
6.UV LED spotlights Pink & Orange bulbs

5. Cover the windows

When the lights are on, ensure you close your windows so that the insects don’t get to the lights. Draw the curtains to cover the light rays if you cannot change the bulb to distract the bugs from seeing the light.

If you have to keep the windows open for one reason or the other, use an insect screen to cover the windows so that the insects cannot get inside the house. Freezing deters bugs and that’s why keeping the room cool will also help.

Open windows will still let the fresh air in the room while the mesh will deter the insects from the house. If you cannot get one, you can use a cloth mesh over the window to deter bugs from indoor lights while the windows are open at night.

Flying insects attracted to light

Flying termites around the lights: The most common insects that round the light are the flying termites. They swarm in large numbers during the mating season and are often found around light after heavy rainfall. Those insects are harmless. They are considered and seen as a delicacy in some communities.

Their main disadvantage is that after they are done swarming the lights, their wings will fall leaving a mess in the area. Cleaning a large number of them can be a real hustle. In some communities, they are collected and fed to chickens.  

Why are moths attracted to light?: Moths are attracted to light at night because when they are out in the wild, they fly around when the moon is up. They fly around the lights in circles because naturally, they use light rays fixed at an angle in the dark to move at night.

However, moths are less active during the day because they tend to be nocturnal. This means that they are naturally active at night as compared to the day. During the day, they hide in upholstery but at night, they are attracted to light.

Flies that are not attracted to light

Are house flies attracted to light?: No, house flies are not attracted to light but they depend on it to move around. When flying in the dark, they depend more on their antennae which are very sensitive. House flies’ eyes are compounded meaning that cant define their surrounding well when it’s totally dark.

Are fruit flies attracted to light?: The answer is no, fruit flies will not fly towards the light because they just need minimal light to see and move around. It has been observed that fruit flies do not like bright light because they just need dim light to activate their eyesight.

House flies and fruit flies are not attracted to light but they need it to see clearly as they fly. This is why you can use diesel to repel those flies from the porch or the patio. However, do not use this indoors.

Moreover, fruit flies don’t bite and they will never bother you outdoors at night even if you have everything that attracts them like ripe fruits near you. However, gnats are flies that look like fruit flies that bite and are attracted to light.

Here is a video that explains why insects are attracted to light:


  1. Light traps for flies: Colorado State University
  2. Harvard University: Flies favorite color