How to Make a Fly Trap with Vinegar: 3 Methods

A vinegar fly trap takes about two minutes to build, costs almost nothing, and works because flies are biologically hardwired to follow the scent of fermentation. Apple cider vinegar mimics the smell of rotting fruit so convincingly that fruit flies treat it as both a food source and a place to lay eggs. Here’s how to build one that actually works, plus the science behind why it does.

What You Need

  • A glass jar (a Mason jar works perfectly, but any jar or drinking glass will do)
  • Apple cider vinegar (about half a cup)
  • Dish soap (2 to 3 drops)
  • A lid, plastic wrap, or paper (to create the entry barrier)

White vinegar will work in a pinch, but apple cider vinegar is significantly more effective. It’s made from fermented apples, so it carries the same complex mix of fruity, acidic aromas that decaying fruit produces. That scent profile is what pulls flies in from across the room.

The Jar-and-Lid Method (Most Effective)

When The Kitchn tested four different DIY fruit fly trap designs head to head, the clear winner was the simplest: a Mason jar with tiny holes punched in the metal lid. Pour about half a cup of apple cider vinegar into the jar, add two or three drops of dish soap, and screw the lid on. Use a hammer and nail to punch several small holes through the lid. That’s it.

The holes may look impossibly small, almost too small for flies to squeeze through. They aren’t. Fruit flies are only about 3 millimeters long, and they’ll find their way in. The tight lid also means you can leave the trap on your counter without worrying about spills, and it keeps the vinegar smell contained enough that the trap attracts flies without making your kitchen reek.

Two Alternative Designs

Plastic Wrap Method

If you don’t have a jar with a metal lid, pour the vinegar and soap mixture into any cup or bowl. Stretch plastic wrap tightly over the top and secure it with a rubber band. Then poke five or six small holes with a toothpick or the tip of a pen. Avoid using a fork, which tends to make holes large enough for flies to escape back out. This method works, but it’s messier and less stable than the lid version.

Paper Funnel Method

Roll a piece of paper into a cone shape with a tiny opening at the narrow end, roughly the diameter of a pencil. Set the cone into a jar so the narrow end points down toward the vinegar. Flies follow the scent through the funnel, land on the liquid, and can’t navigate back up through the small opening. This design is better for catching larger numbers quickly, but the funnel can shift if bumped.

Why Dish Soap Is Essential

Without dish soap, you’ll attract plenty of flies but catch almost none. Here’s why: water and vinegar have surface tension, a thin molecular “skin” on the liquid’s surface. Flies are light enough to land on it, take a sip, and fly away. Dish soap is a surfactant, meaning it breaks that surface tension. When a fly touches the liquid, it falls through immediately and drowns.

The soap also breaks down the waxy, water-resistant coating on the fly’s body. Even if a fly initially stays afloat, the soap strips away that protective layer, and the insect sinks. Two or three drops is plenty. More than that can create a soapy smell that competes with the vinegar and reduces the trap’s attractiveness.

Why Vinegar Works So Well on Fruit Flies

Fruit flies evolved to find fermenting fruit. During fermentation, yeast and bacteria convert sugars into ethanol and acetic acid (the main component of vinegar). For a fruit fly, the smell of acetic acid signals ripe-to-overripe fruit, which is both their preferred food and their ideal egg-laying site. Research published in eLife found that hungry flies show a strong appetitive response to acetic acid, treating it as a calorie source they can actually metabolize for energy. The flies aren’t just drawn to the smell out of curiosity. They’re biologically compelled to seek it out.

This is also why vinegar traps are highly specific. They’re excellent at catching fruit flies (also called vinegar flies), but they won’t do much against common house flies, drain flies, or phorid flies. Each of those species is attracted to different things: house flies prefer protein-based decay, drain flies breed in organic sludge inside pipes, and phorid flies are drawn to moist decomposing matter. If your vinegar trap isn’t catching anything after a day or two, you’re likely dealing with a different species entirely.

Boosting Your Bait

Plain apple cider vinegar and soap will handle most fruit fly problems. But if you want to increase the trap’s pulling power, a few additions help. Stir in a teaspoon of sugar, which amplifies the fermentation scent and gives flies an extra reason to investigate. You can also add a small piece of overripe fruit directly into the jar. A banana peel or a few soft strawberry slices produce ethanol and other volatile compounds that make the trap even more irresistible.

For a more aggressive approach, dissolve a pinch of active dry yeast into warm water with a tablespoon of brown sugar before mixing it with the vinegar. As the yeast ferments the sugar, it produces carbon dioxide, which is the same gas you exhale. CO₂ is the primary attractant for mosquitoes, but it also draws in fruit flies at close range. This version of the trap is smellier and bubbles as it works, so it’s better suited for a garage or porch than a kitchen counter.

Where to Place the Trap

Set the trap as close as possible to where you’re seeing the most flies. For most kitchens, that means near the fruit bowl, the compost bin, or the sink where produce scraps accumulate. Fruit flies have a limited flight range and tend to hover within a few feet of their food source, so a trap on the opposite side of the kitchen may go untouched while flies swarm your bananas.

If you have flies in multiple areas, make two or three traps rather than relying on one. They’re cheap enough that there’s no reason not to. Keep the traps away from open windows or fans, since moving air disperses the vinegar scent and makes it harder for flies to track.

Maintenance and Timing

Replace the vinegar every five to seven days. Over time, the acetic acid concentration drops as it evaporates, dead flies accumulate in the liquid, and the bait loses its punch. You’ll typically notice the biggest catch in the first 48 hours. If you’re seeing dozens of flies in your trap each day, that’s a sign the population is large, and you should also eliminate their breeding source. Check for forgotten fruit, damp sponges, recycling bins with residue, and drains with organic buildup.

A vinegar trap alone won’t solve an infestation if the breeding source is still active. A single female fruit fly lays up to 500 eggs, and they hatch in as little as 24 hours. The trap catches adults, but new ones will keep emerging until you remove whatever they’re breeding in. Clean the area thoroughly, store ripe fruit in the refrigerator, and keep the traps running for at least a week after you stop seeing flies to catch any stragglers.