What Types of Flies Are Attracted to Light?

The phenomenon of insects gravitating toward light sources is a common observation known as positive phototaxis. This behavior is not a simple attraction but rather a side effect of a fundamental navigational system gone awry. For flies, the light source does not represent a beacon but a source of confusion that disrupts their ability to orient themselves in flight.

Why Flies Navigate Using Light

Flies rely on a flight stability reflex known as the dorsal light response. This mechanism causes the insect to automatically tilt its dorsal side toward the brightest visual hemisphere, which is naturally the sky, sun, or moon. This reflex maintains a stable body posture and determines which way is “up” during flight.

When an insect uses a distant, celestial light source, the light rays are parallel, allowing the fly to maintain a straight flight path by keeping the light at a constant angle. However, when the fly encounters a close, artificial light—like a porch lamp or light bulb—the light rays radiate outward. As the fly attempts to keep its back toward this near-field light source, its flight path is continuously corrected, causing it to turn and spiral inward toward the light. The seemingly frantic circling is not an intentional flight toward the bulb but a perpetual state of disorientation and an inability to maintain a straight trajectory.

Specific Flies Drawn to Illumination

The response to light is most pronounced in members of the order Diptera (true flies). Common household pests, such as the house fly (Musca domestica) and the fruit fly (Drosophila melanogaster), exhibit positive phototaxis. These flies are often drawn to illuminated areas when seeking an exit, moving toward the brightest spot, like a window or doorway.

Other Diptera, including cluster flies and fungus gnats, also display this light-seeking behavior. Non-biting midges are frequently captured in light traps due to their strong phototactic response, especially near standing water where they breed.

Wavelengths and Attraction

The fly’s visual system is tuned to specific parts of the light spectrum, making some light sources more attractive than others. Unlike human vision, which peaks in the yellow-green range, the compound eyes of flies are highly sensitive to ultraviolet (UV) light and the blue end of the visible spectrum. This sensitivity is an adaptation because natural celestial light, like the sun, is rich in UV and blue wavelengths.

Flies are most strongly attracted to light in the UV-A range (315 to 400 nanometers), with peak attraction often centered between 350 and 370 nanometers. Lights that emit heavily in this range, such as mercury vapor lamps and standard fluorescent bulbs, are effective at drawing flies. Conversely, light sources that primarily emit longer wavelengths—like yellow, orange, and red light—are significantly less attractive because they fall outside the fly’s peak visual sensitivity.

Using Light Knowledge for Control

Understanding the fly’s phototactic response provides strategies for managing their presence. For prevention, exterior lighting near doors and windows should be minimized or switched to sources that emit little UV and blue light. Replacing bright, white-spectrum bulbs with warm-colored LEDs or specialized yellow “bug lights” reduces attraction, as these lights shift the output to less sensitive, longer wavelengths.

For control, the strong attraction to UV light is utilized in commercial insect light traps (ILTs). These devices, often employing UV-A emitting LED or fluorescent bulbs, capitalize on the fly’s response to lure them away from food preparation or living areas. Effective control involves placing these traps strategically, away from competing light sources, and positioning them to intercept flies that have entered a building, rather than drawing them in from the outside.