What Smell Attracts Flies (and What Repels Them)

Flies are attracted to the smell of fermentation, decay, and organic waste. The specific odors depend on the type of fly, but the common thread is volatile chemicals released when food, fruit, or animal matter breaks down. Understanding which scents draw which flies can help you eliminate the source of an infestation or build a more effective trap.

What Attracts Fruit Flies

Fruit flies are tuned to the chemical signatures of ripening and fermenting fruit. The two biggest attractants are ethanol (alcohol produced during fermentation) and acetic acid (the sharp smell in vinegar). Fruit flies are drawn to fruits containing less than 7% ethanol by volume, which is roughly the alcohol content of an overripe banana or a glass of wine. This is why a forgotten piece of fruit on your counter becomes a magnet within a day or two.

Fermented and sweet liquids are equally powerful. Fruit flies seek out liquor, syrup, soda, vinegar, and beer. Apple cider vinegar works so well as a trap bait because it combines both acetic acid and residual fruit sugars into one concentrated scent signal. Yeast mixtures work for the same reason: active yeast produces ethanol and carbon dioxide, mimicking the exact chemical profile of rotting fruit.

Certain fruit rinds add another layer of attraction. Farnesol, a compound found in citrus peels, becomes dramatically more attractive to fruit flies when combined with ethanol. On its own at low concentrations, farnesol barely registers. But mixed with alcohol vapor, it becomes a powerful lure, stronger than either scent alone. This synergy explains why your citrus fruit bowl can seem to summon flies out of nowhere once one orange starts to turn.

What Attracts House Flies and Blow Flies

House flies and blow flies respond to a completely different set of odors. Instead of sweet fermentation, these species track the sulfur-heavy compounds released by decaying protein. Two chemicals stand out as especially potent: dimethyl disulfide and dimethyl trisulfide. Research at Purdue University tested nine different decay-related compounds in field settings and found these two sulfur compounds were the most important attractants, particularly for blow flies found worldwide.

In practical terms, this means house flies and blow flies are drawn to animal feces, garbage containing meat or dairy, dead animals (even a mouse in a wall void), and pet waste. The smell doesn’t need to be strong enough for you to notice. Flies detect these sulfur volatiles at concentrations far below the human threshold, so a source you can’t smell can still be pulling flies into your home.

How Flies Detect Odors

Flies have an extraordinarily sensitive sense of smell, housed primarily in their antennae. The surface of each antenna is covered in tiny hair-like structures called sensilla, each containing specialized nerve cells that respond to airborne chemicals. These neurons use two main types of receptor proteins to identify odors. One type works in pairs, with a general “co-receptor” partnering with a specific receptor tuned to a particular chemical. The other type evolved from a completely different family of proteins and detects acids, amines, and other pungent compounds.

Together, these receptor systems allow flies to distinguish between alcohols, acids, aldehydes, esters, and ketones, covering virtually every chemical class released by decomposing organic matter. A single fruit fly antenna can detect a faint whiff of vinegar from across a room, then follow the concentration gradient straight to the source.

Common Household Odor Sources

Knowing what flies smell helps you find where they’re breeding. All flies lay eggs on moist organic material, and the odor source is almost always the breeding site. Here are the most common culprits inside a home:

  • Fruit bowls and compost bins: Ripening fruit and vegetable scraps release ethanol and acetic acid that attract fruit flies. Even a single soft spot on a tomato is enough.
  • Sink and floor drains: A gelatinous film of organic debris builds up inside drains over time. This sludge produces the moist, decaying smell that attracts drain flies, and their larvae actually live submerged in it, breathing through tubes extended to the surface.
  • Garbage cans and disposals: Meat scraps, dairy residue, and liquefied garbage at the bottom of a trash bag release sulfur compounds that draw house flies and blow flies.
  • Recycling bins: Empty beer bottles, wine bottles, and soda cans hold just enough sweet residue to attract fruit flies in large numbers.
  • Pet areas: Animal feces is one of the primary egg-laying sites for house flies. Litter boxes and outdoor waste that isn’t promptly removed are consistent attractants.

The fix in every case is the same: remove or seal the organic material. Cleaning the odor source eliminates both the attractant and the breeding site simultaneously.

Using Attractant Smells for Traps

The most effective DIY fruit fly trap uses apple cider vinegar with a few drops of dish soap in a shallow bowl or jar. The vinegar’s fermentation smell draws flies in, and the soap breaks the surface tension of the liquid so they sink instead of landing safely. Covering the jar with plastic wrap and poking small holes concentrates the scent while making escape harder.

For a stronger lure, add a small piece of overripe fruit or a pinch of active dry yeast mixed with warm water and a teaspoon of sugar. The yeast produces ethanol and CO2, creating a more complex fermentation scent that mimics a natural food source. Red wine and beer also work well as bait for the same reason.

These traps are effective for fruit flies but won’t do much for house flies or blow flies. Those species need protein-based attractants. Commercial fly traps designed for house flies typically use proprietary blends that mimic decay odors, and they’re best placed outdoors since the smell is unpleasant to humans.

Smells That Repel Flies

Several plant-based scents actively deter flies rather than attracting them. Thyme is one of the most effective. It functions as a natural insecticide against house flies and doubles as a mosquito repellent. Peppermint oil kills and repels multiple insect species. Lavender, basil, eucalyptus, and pine oil all show measurable repellent effects, though most research has focused on mosquitoes rather than house flies specifically.

You can use these oils in a diffuser, spray them diluted with water around entry points, or grow the live plants near doors and windows. They won’t solve an active infestation on their own since flies that have already found a breeding site will tolerate some deterrent odors to reach it. But combined with eliminating the attractant source, repellent scents help keep new flies from entering your space.