A homemade gnat trap built with apple cider vinegar, sugar, and dish soap stops fruit flies and fungus gnats fast, but it only works completely when paired with habitat cleanup.
Fruit flies breed on forgotten bananas and open wine bottles. Fungus gnats hatch from damp potting soil in houseplant pots. The real fix lives in a small bowl on your counter — and it costs about thirty cents to make every time.
The recipe that works is standard across the lawn care community because it targets what gnats actually fly toward: the scent of rotting fruit. Apple cider vinegar mimics that smell better than anything in your pantry. A drop of dish soap kills the surface tension so gnats sink instead of skimming across. Below are the exact ratios, the most common setup mistake, and the treatments that stop new gnats from hatching while you trap the adults.
What Draws Gnats Inside Your Home
Fruit flies come in on produce and stay for the fermenting smells around trash cans, compost bins, and sink drains. Fungus gnats ride home in potting soil and multiply in the moist top layer of houseplant pots. Both types follow the same scent path — rotting organic matter — so one trap mixture handles both.
Before you build a trap, spot the source. If gnats cluster around the fruit bowl or garbage can, you have fruit flies. If they swarm near houseplants or kick up from damp soil when you water, you have fungus gnats. The trap catches the adults either way, but stopping the next generation means treating the soil or the drain.
The Only Recipe You Need
Mix the ingredients in any small container, then cover it with plastic wrap poked with small entry holes. The sugar and vinegar release scent. The soap breaks the water tension so gnats can’t stand on the liquid surface — they fall in and drown within seconds.
Standard Ingredient Ratios
- Apple cider vinegar: ¼ cup (the base attractant)
- Sugar: 1 teaspoon (boosts fermentation scent)
- Liquid dish soap: 3 to 5 drops (Dawn is the most frequently cited brand)
- Warm water: ¼ to ½ cup (helps dissolve the sugar and thins the mixture)
Step-By-Step Setup
- Pour the apple cider vinegar into a glass bowl or jelly jar. Glass holds the plastic wrap seal better than plastic.
- Stir in the sugar until it dissolves completely. Warm water helps this along — add the water now if the mixture is still thick.
- Add the dish soap last. Too much soap creates foam that muffles the scent; a few drops is enough. Stir gently so the soap distributes without frothing.
- Cover the container tightly with plastic wrap. Hold it in place with a rubber band or a strip of tape.
- Poke 3–4 small holes with a toothpick or the narrow end of a chopstick. Holes should be just large enough for a gnat to squeeze through — about 1/16 inch.
- Set the trap where you see the most gnat activity: next to the fruit bowl, beside the sink drain, or on the soil surface of an infested houseplant.
What success looks like: within 12 hours you will see drowned gnats floating in the liquid. When the trap looks full or the liquid turns murky, swish the bowl to push any live gnats under the surface, then dump and refill.
Why The Trap Stops Working On Its Own
The vinegar-soap trap kills adult gnats efficiently. It does nothing to the eggs and larvae hiding in wet soil or the slime layer inside a drain. If you trap adults for a week and new gnats keep appearing, you are only treating the flying population — the next generation is hatching from the source.
Orkin’s pest control guidance makes the point clearly: homemade traps must run alongside habitat remediation. That means pulling out rotting produce, scrubbing drain pipes, drying out the top inch of houseplant soil, and fixing any leaky faucet or pipe that keeps a surface wet.
Commercial Options Worth Knowing
Sometimes a homemade solution isn’t enough — or you want something that keeps working for weeks without refilling. Commercial gnat traps use sticky adhesive or UV light to cover more ground. We tested the top-rated models and compared them by catch volume, refill cost, and ease of placement.
The roundup covers the best commercial gnat traps for indoor use, including plug-in units that run nonstop and sticky traps that slide right into potted plant soil. If you like the convenience of set-and-forget pest control, the full list is worth reading.
Common Mistakes That Sabotage Homemade Traps
- Holes too large: Gnats fly back out once they hit the liquid and realize they can’t land. Keep holes at toothpick width.
- Too much soap: More than 5 drops builds foam that masks the vinegar scent. The mixture should be mostly clear with just a slight slick surface.
- Plastic container: Plastic bowls and cups flex, breaking the plastic wrap seal. A glass jar or bowl holds the seal tight.
- Skipping the source treatment: Trapping adults without drying out plant soil or cleaning the drain is like mopping a flooded floor without turning off the water.
- Not swishing before opening: Live gnats cling to the underside of the plastic wrap near the holes. Swirl the liquid to submerge them before you pull the wrap off.
Treating The Root: Soil And Drain Care
For fungus gnats in houseplants, let the top two inches of soil dry completely between waterings. You can also mix one part 3% hydrogen peroxide with four parts water and pour it through the soil — it kills larvae on contact without harming the plant. For drain flies breeding in sink pipes, pour a cup of boiling water down the drain once a day for a week, then scrub the drain stopper and flange with a stiff brush.
Do not use bleach down drains unless you are certain the pipes are clear of standing water and you are ventilating the room. Hydrogen peroxide is safer than bleach for routine drain treatment.
Finish With The Right Strategy For Your Situation
| Gnat Type | Primary Source | Best First Move |
|---|---|---|
| Fruit flies | Rotting produce, trash, open drinks | Remove all exposed food, set vinegar trap, clean the sink drain |
| Fungus gnats | Overwatered houseplant soil | Dry the top 2 inches of soil, set yellow sticky traps, water with hydrogen peroxide mix |
| Drain flies | Slime inside pipes, leaky traps | Pour boiling water down drains weekly, scrub drain covers, fix pipe leaks |
| Mixed infestation | Kitchen plus houseplants | Tackle both sources simultaneously — vinegar trap for adults, soil drying and drain scrub for larvae |
Compare the best commercial gnat traps and sticky boards for times when the swarm outruns a DIY bowl. One trap works fast; the right combination of trapping and source treatment works for good.
FAQs
Does white vinegar work as well as apple cider vinegar?
No. White vinegar lacks the fermented fruit scent that draws gnats. Apple cider vinegar mimics rotting organic matter, which is what fruit flies and fungus gnats naturally search for. Use apple cider vinegar unless the recipe specifically calls for an alternative like old beer or wine.
How often should I empty and refill the trap?
Empty the trap every 2 to 3 days, or sooner if the liquid looks cloudy and full of dead gnats. The vinegar scent fades over time, so a fresh batch draws more gnats than a stale one. Never let the trap sit longer than a week without replacing the mixture.
Will the trap attract more gnats from outside?
No. The vinegar scent only travels a few feet. It will not pull gnats through walls or from outdoors. Every gnat that ends up in your trap was already inside your home, drawn by the same food or moisture sources that brought them in originally.
Is the mixture safe around pets and children?
Yes. The ingredients are non-toxic in the amounts used — vinegar, sugar, dish soap, and water. A cat or dog that licks the liquid might get an upset stomach from the soap, but the small quantity inside a covered container is not a hazard. Keep the trap out of reach as a precaution.
Why do I still see gnats after using the trap for a week?
You are catching adults but missing the source. Fungus gnat larvae live in damp soil, and fruit fly eggs hatch inside drain slime or rotting fruit. The trap kills the flying gnats you see, but new ones replace them every 24 hours until you dry the soil and scrub the drain.
References & Sources
- Orkin. “Gnat Traps – Homemade and Commercial Gnat Killers.” Explains why habitat remediation is necessary alongside trapping.
