It is a common observation that flies and other insects gather around light sources, but the question of whether light attracts flies has a complex answer rooted in insect biology. The interaction is a nuanced behavioral response that depends on the light’s specific characteristics and the fly’s inherent programming. Understanding this requires separating the fly’s innate light-seeking behavior from the accidental confusion caused by artificial illumination.
The Mechanism of Light Response
The movement of an organism in response to a light stimulus is a genetically programmed behavior called phototaxis. The majority of adult flies exhibit positive phototaxis, meaning they instinctively move toward increasing light intensity. This response is fundamental to their survival, helping them navigate toward open spaces like the sky or find food and mates. The fly’s brain processes light cues from its compound eyes to control its movement. While some organisms exhibit negative phototaxis, moving away from light, the adult fly displays a strong, innate drive toward light sources. This behavior is a deeply ingrained reflex that has evolved to guide them through their environment.
Wavelength and Spectral Sensitivity
Flies do not perceive light in the same way humans do, and their attraction is highly dependent on the light’s wavelength. Visible light emitted by common household bulbs, such as warm white or yellow light, is generally less attractive to flies than light in the ultraviolet (UV) spectrum. Flies possess photoreceptors highly sensitive to UV light, particularly in the UVA range (315–400 nanometers), with peak sensitivity often observed around 340–370 nanometers.
Flies use UV light cues for locating food sources and navigating the natural world. The UV component of sunlight is a strong navigational signal, and the fly’s visual system is optimized to detect it. Therefore, a light source that emits significant UV-A radiation will elicit a much stronger behavioral response than a brighter light that lacks UV output.
Orientation Versus Direct Attraction
When flies are seen circling an indoor lightbulb at night, this behavior is often less about direct attraction and more about a navigational error. Flies, like many flying insects, rely on distant, bright objects like the sun and moon for orientation, using them as a celestial compass to maintain a straight flight path. This process is known as transverse orientation, where the insect keeps a constant angular relationship between itself and a distant light source.
When a fly encounters a nearby, artificial light source, this navigational system fails. Because the light source is close, the angle of the light changes rapidly as the fly moves, causing the fly to constantly adjust its path in an attempt to maintain a fixed angle. The resulting flight path is a continuous, erratic circling or spiraling around the light, which traps the insect near the source. This confusion is distinct from the phototaxis that lures a fly toward a specific UV wavelength.
Applications in Fly Management
The understanding of a fly’s positive phototaxis and its specific spectral sensitivity is applied in modern fly management technology. Devices such as insect light traps utilize bulbs that emit light predominantly in the UV-A spectrum, typically peaking around 350 to 370 nanometers. These wavelengths exploit the fly’s natural attraction to UV light to draw it toward the trap.
Once the fly is drawn close, it is either caught on a sticky glue board or eliminated by an electrified grid. Effective management strategies involve placing these UV light traps away from competing light sources and food preparation areas to maximize their effectiveness. Conversely, minimizing the use of high-UV output lighting near building entryways helps prevent flies from being drawn into indoor spaces.

