What Do Flies Like? The Science Behind What Attracts Them

The attraction of flies to specific locations is not random; it is a biological imperative driven by the need for survival and reproduction. Common household species, such as the House Fly (Musca domestica) and the Fruit Fly (Drosophila melanogaster), possess sophisticated sensory systems that guide them toward resources. Flies are primarily seeking three things: a source of energy, environmental conditions that support their adult lives, and a safe, nutrient-rich site for their offspring to develop. Understanding the sensory cues that govern these movements reveals the science behind fly attraction.

Olfactory Cues The Power of Scent

The primary mechanism flies use to locate resources is their sense of smell, or olfaction. Flies detect airborne chemical signals, known as volatile organic compounds (VOCs), through specialized sensilla on their antennae. These compounds indicate the location and quality of food or an egg-laying site. For fruit flies, the smell of fermentation is the most powerful attractant, particularly the volatile chemicals produced by yeast. Acetic acid, the compound that gives vinegar its sharp odor, is a key signal indicating that fruit is past the initial ripening stage. Other fermentation byproducts, such as ethanol, acetoin, and isobutyric acid, work synergistically with acetic acid to create an irresistible blend that signals a prime feeding and breeding ground.

House flies are drawn to the odors of putrefaction and waste, which are indicative of the decaying organic matter they use for oviposition. VOCs for house flies include trimethylamine, which is associated with rotting fish and is a component of decomposing protein. Other chemical cues like butyric acid and isovaleric acid, produced during the breakdown of fats and proteins, signal nutrient availability in manure or garbage. These chemical blends are often more attractive than any single compound.

Blow flies are hypersensitive to the sulfur and nitrogen compounds released during the initial stages of animal decomposition. This attraction is rapid, sometimes occurring within minutes of death, as they seek the freshest possible site. The olfactory system in all these species is wired to prioritize these specific odors, leading them directly to their required resource.

Visual and Environmental Triggers

While odor brings a fly into the general vicinity of a resource, visual and environmental cues guide the final approach and landing. Flies possess large compound eyes that are highly sensitive to specific wavelengths of light, which they use for navigation and target identification. House flies, for example, are strongly attracted to the blue-green light spectrum and ultraviolet-A (UVA) light. This attraction to blue and UVA often explains why commercial light traps are effective. House flies also utilize dark contrasting colors and vertical objects, such as window frames or hanging cords, as visual cues for resting and foraging sites. The addition of dark patterns to an attractive color, such as blue, can enhance its appeal by mimicking safe crevices or edges.

Fruit flies display visual behavior, with their color preference often shifting depending on the time of day. They demonstrate a positive phototaxis toward UVA light. However, studies show that their attraction to green light is highest during their most active periods in the morning and afternoon. Environmental factors also play a significant role, with adult house flies seeking warm microclimates and often showing a preference for lower humidity, which may be a behavioral defense mechanism against fungal pathogens.

Attraction Based on Life Cycle Needs

The purpose of a fly’s attraction is to ensure the survival of its offspring, which ties the sensory cues to the species-specific needs of its life cycle. Female house flies, once mated, seek out moist, decaying organic matter, such as animal manure or fermenting compost, for oviposition. The eggs must remain moist to hatch, and the decaying material provides the warmth and rich nutrients required for the larval stage. Larval development is fastest in a warm environment.

For fruit flies, the attraction is not to the fruit itself, but to the yeast growing on the fruit, which provides the nutrients required for the larvae. Females will specifically choose substrates, like overripe fruit, that are heavily colonized by fermenting yeast. This choice ensures that the newly hatched larvae have an immediate and high-quality food source. Females that are ready to lay eggs prioritize the volatile cues from the host material over other attractants.

Blow flies will assess carrion to ensure it is suitable for their young. Females are highly selective, preferring the early stages of decomposition, which offer the best tissue availability for the maggots before the resource is depleted or becomes too toxic. Oviposition decisions are tied directly to the temperature of the substrate, ensuring the fastest possible larval development.