Plenty of flies gather at lights after dark, from house flies and mosquitoes to tiny biting midges, sand flies and the small flies that hatch from nearby water, but not every fly does. The pull is strongest from light at the bluish and ultraviolet end of the spectrum, which people barely see.1PubMed Central. Artificial light and biting flies: the parallel development of attractive light traps and unattractive domestic lights And the flies aren’t really aiming for the bulb. A steering habit meant for flying under the open sky leaves them stuck circling it.2Nature Communications. Why flying insects gather at artificial light
The Flies Most Likely to Show Up at Your Lights
- House flies: strongly drawn to ultraviolet (UV) light, the invisible light just beyond violet that bug zappers use.3Canadian Journal of Research. THE REACTIONS OF THE HOUSEFLY, <i>MUSCA DOMESTICA</i> LINN., TO LIGHT OF DIFFERENT WAVE-LENGTHS
- Mosquitoes: come in larger numbers to UV, blue and green light.1PubMed Central. Artificial light and biting flies: the parallel development of attractive light traps and unattractive domestic lights
- Biting midges (no-see-ums): fly toward the brightest light they can see, from about 15 meters away for a small UV trap.4PubMed Central. The range of attraction for light traps catching Culicoides biting midges (Diptera: Ceratopogonidae)
- Sand flies: attracted to short-wavelength light like UV and blue.1PubMed Central. Artificial light and biting flies: the parallel development of attractive light traps and unattractive domestic lights
- Midges, gnats and other small flies from ponds and streams: many swarm to lights beside the water.5Aquatic Sciences. Artificial light at night reduces emergence and attracts flying adults of aquatic Diptera
A house fly responds far more to UV than to any visible color.3Canadian Journal of Research. THE REACTIONS OF THE HOUSEFLY, <i>MUSCA DOMESTICA</i> LINN., TO LIGHT OF DIFFERENT WAVE-LENGTHS In one comparison, a blue lamp drew under a third as many house flies as UV lamps did, and a white lamp under a quarter.6Entomologia Experimentalis et Applicata. Intensity and spectral emission as factors affecting the efficacy of an insect electrocutor trap towards the house‐fly When a UV trap switches on in a dark room, nearby flies rush to it, then settle down after a while.7PubMed Central. Turning Ultraviolet Light Traps On and Off Increases Their Attraction to House Flies (Diptera: Muscidae) The flies within about 10 meters of the light are the ones most affected.7PubMed Central. Turning Ultraviolet Light Traps On and Off Increases Their Attraction to House Flies (Diptera: Muscidae)
Which kind you get depends a lot on what lives nearby. Water brings midges and mosquitoes. Livestock or garbage brings house flies. A cloud of tiny, fragile, mosquito-like insects often means non-biting midges. Stout gray flies bumping against the glass are far more likely house flies. Tiny specks that sting you on the porch are likely biting midges.
Water-born flies can come from far away. Lights beside water can draw flying adults in numbers about eight times higher than dark spots,5Aquatic Sciences. Artificial light at night reduces emergence and attracts flying adults of aquatic Diptera and some kinds may be pulled from as far as 1,800 meters away.5Aquatic Sciences. Artificial light at night reduces emergence and attracts flying adults of aquatic Diptera
A swarm at the light doesn’t necessarily mean you’re about to be bitten. Mosquitoes, biting midges and sand flies bite, while house flies and non-biting midges do not, and many of the small flies at a lamp are non-biters that only look similar. House flies are a different nuisance: they land on food and waste, so they matter more for hygiene than for bites.
Why Flies Circle a Light Instead of Landing on It
Older ideas said insects use the moon to navigate, or that they flee toward light to escape.2Nature Communications. Why flying insects gather at artificial light But insects don’t steer straight at a lamp. They turn their back toward it and fly across it.2Nature Communications. Why flying insects gather at artificial light Under the natural sky, tilting the back toward the brightest part helps a flying insect stay upright.8PubMed Central. Why flying insects gather at artificial light Near a lamp, that same reflex keeps it steering in circles around the light, trapped.8PubMed Central. Why flying insects gather at artificial light
On your porch, this looks like flies looping and bumping around the bulb instead of landing calmly. A fly that finally lands near the bulb is often worn out, not choosing to rest there, and many end up exhausted nearby by morning. Switching the lamp off breaks the trap: the insects go back to using the sky for orientation and usually disperse within a short time. The pull comes from the light, not heat: cool LEDs still draw flies if they give off bluish light.
Some insects don’t follow the pattern. Vinegar (fruit) flies in tests flew over upward-facing UV lights without being thrown off.2Nature Communications. Why flying insects gather at artificial light
Shiny surfaces can fool insects in another way. Many insects whose young grow in water find ponds by the flat, polarized glare reflected off the surface.9PubMed. Degrees of polarization of reflected light eliciting polarotaxis in dragonflies (Odonata), mayflies (Ephemeroptera) and tabanid flies (Tabanidae) Horse flies use the same cue to find water.10PubMed. New kind of polarotaxis governed by degree of polarization: attraction of tabanid flies to differently polarizing host animals and water surfaces Dark glass windows that reflect strong glare can draw swarms of water-born insects like caddisflies.11PubMed. Glass buildings on river banks as “polarized light traps” for mass-swarming polarotactic caddis flies Drawing blinds or curtains removes that false-water glare, which a lamp change alone would not.
Which Light Colors Draw Flies Most
Many flies have eyes with UV-, blue- and green-sensitive cells.12PubMed. Photoreceptor spectral sensitivity of the compound eyes of black soldier fly (Hermetia illucens) informing the design of LED-based illumination to enhance indoor reproduction Light rich in UV and blue stands out to them far more than to us, while red light barely registers. A bulb that looks plain white to you can still give off a large share of blue light that is vivid to a fly. Yellow, orange and red sit at the end of the spectrum where many insect eyes are least sensitive, so those lamps look dim to them even if they look bright to you.
On a bulb box, daylight or cool white bulbs tend to be bluish and are the ones likely to draw more insects. Soft white or warm white bulbs are yellowish and give off less of the blue light flies notice. Black lights and bug zappers are built to put out UV, so using one as a decorative lamp near a seating area pulls in flies on purpose.
A few flies break the rule. The oriental fruit fly, a crop pest, preferred green and yellow light over blue and red.13Entomologia Experimentalis et Applicata. The photokinesis of oriental fruit flies, Bactrocera dorsalis, to LED lights of various wavelengths
How to Light Your Home to Attract Fewer Flies
Of six common household bulbs, old incandescent bulbs drew the most insects.14bioRxiv. Insect attraction to the six major types of traditional-style, residential light bulbs and implications for insect survival and light pollution Warm LED bulbs drew the fewest, even fewer than yellow bug lights.14bioRxiv. Insect attraction to the six major types of traditional-style, residential light bulbs and implications for insect survival and light pollution Yellow bug lights also drew more earwigs than other bulbs.14bioRxiv. Insect attraction to the six major types of traditional-style, residential light bulbs and implications for insect survival and light pollution So choose a warm LED, marked around 2700K or labeled soft white.
Color temperature, shown in K on the box, tells how warm or cool a bulb looks, not how hot it gets. Lower numbers like 2700K are warm and yellowish. Bulbs at 5000K and up are cool and bluish, and they draw more. If the box says only soft white, warm white or daylight, soft and warm usually mean the low end of the scale and daylight the high end.
Timing and placement matter too. Even very dim light at night, around 1 lux, can shorten fruit fly lives and cut egg-laying.15PubMed. Chronic exposure to dim artificial light at night decreases fecundity and adult survival in Drosophila melanogaster Lights near water pull flies away from the water, where many would otherwise stay, and toward your home.5Aquatic Sciences. Artificial light at night reduces emergence and attracts flying adults of aquatic Diptera So use motion sensors or timers and point lights downward. Place lights away from doors so flies gather away from entries.
A UV trap can work in your favor if you place it away from patios and doors, so flies are pulled toward it and away from where people sit. Indoors, a trap works best when other lights are off, and it affects only flies near it.
Why Some Nights Bring More Flies Than Others
Sand fly catches at light traps on full-moon nights were about a quarter of new-moon catches.16PubMed Central. The influence of moonlight and lunar periodicity on the efficacy of CDC light trap in sampling Phlebotomus (Larroussius) orientalis Parrot, 1936 and other Phlebotomus sandflies (Diptera: Psychodidae) in Ethiopia Biting midges were also least caught around the full moon.17Australian Journal of Entomology. Moon phase and other factors affecting light‐trap catches of <i>Culicoides brevitarsis</i> Kieffer (Diptera: Ceratopogonidae) On a full-moon night the sky is already bright, so your lamp stands out less and draws fewer of the insects in the area. On a moonless night the lamp is the brightest thing around, and the pull on nearby flies is strongest.
Weather matters as well. Midge catches rose and fell with temperature and wind.17Australian Journal of Entomology. Moon phase and other factors affecting light‐trap catches of <i>Culicoides brevitarsis</i> Kieffer (Diptera: Ceratopogonidae) Wind makes flying hard for small insects, so catches fell on windy nights and rose when the air was still. In fruit flies, warmer weather raised activity more than humidity did,18PubMed Central. Effects of Physiological Status and Environmental Factors on the Lure Responses of Three Pest Fruit Fly Species (Diptera: Tephritidae) so humidity alone is a poor way to predict a bad evening.
The worst combination is a warm, still, moonless evening, especially for biting midges. On those nights, keep lights off or warm-toned, and a breeze or fan can help keep small flies away.
Flies That Ignore Lights or Follow Other Cues
Horse flies use reflected glare to spot sunlit dark animals to bite.19PubMed Central. Why do horseflies need polarization vision for host detection? Polarization helps tabanid flies to select sunlit dark host animals from the dark patches of the visual environment So they bite by day in sunny spots, not at porch lights. Night light can affect flies in other ways too: in flesh flies, even 0.01 lux of night light disrupts their seasonal resting cycle.20PubMed Central. Urban warming and artificial light alter dormancy in the flesh fly
Smell from food, trash or waste draws many flies whether lights are on or off. Daytime fliers such as horse flies are active when your porch light is off or irrelevant, so changing bulbs does nothing for them. Light changes help most with night fliers that come to lamps, such as midges and mosquitoes.
It helps to match the fix to the fly:
- Fruit flies: remove ripe fruit and clean drains, not lights.
- Horse flies: avoid sunny pastures at midday and wear light colors.
- House flies: remove garbage and use UV traps.
- Mosquitoes: remove standing water.

