How to Make Gnat Traps: 5 Best DIY Methods
Make five homemade gnat traps with vinegar, fruit, funnels, sticky cards, and drain checks—and match the method to the flies in your home.

The best homemade gnat trap depends on what you are calling a gnat. Tiny tan flies circling a banana need a fermentation bait. Dark flies lifting from houseplant soil need a yellow sticky card and a drier soil surface. Fuzzy, moth-like flies resting around a sink need a drain inspection and mechanical cleaning, not a bowl of cider vinegar.
That distinction is the useful shortcut. A trap can remove adults from the room, but it cannot clean the food, potting mix, or drain film where the next generation is developing. Use the five methods below as targeted tools, then follow the source-removal step under the method that matches your pest.
The right trap depends on where the flies are breeding
Start by watching the insects for two minutes instead of mixing the first recipe you find. Note where they take off, what they land on, whether they hover or crawl, and whether the population is concentrated around a plant, a fruit bowl, a recycling bin, or a drain.
| Likely pest | What you notice | Best first trap or test | What actually ends the problem |
|---|---|---|---|
| Fruit flies (Drosophila) | Tiny tan or brown flies, often with red eyes, around fruit, drinks, trash, or recycling | Apple cider vinegar and dish soap, or a funnel jar | Remove fermenting produce, residue, and damp food waste |
| Fungus gnats (Bradysia) | Slender dark flies with long legs and weak flight around pots and windows | Yellow sticky card near the soil | Let the mix dry as the plant allows and address larvae in the soil |
| Drain flies (moth flies, Psychodidae) | Small gray, fuzzy flies resting on walls near a sink, shower, or floor drain | Clear-tape or inverted-cup drain test | Scrub the organic film inside the drain and fix moisture or leaks |
The University of Minnesota Extension describes household fruit flies as small, tan flies commonly found where fermenting fruit, beer, wine, soft drinks, or trash are present. Colorado State University Extension places fungus gnat larvae in the growing medium of houseplants, while Virginia Tech describes drain flies as hairy, weak fliers that develop in sludgy material inside drains. Those are different habitats, so one “gnat killer” recipe cannot be equally useful for all three.
Identify the fly before you mix the bait
Fruit flies gather around fermenting food
Fruit flies are compact and usually tan, brown, or amber, with dark abdomens and often red eyes. They hover around ripe fruit, bottles, cans, compost containers, sink residue, and garbage rather than emerging from a pot of soil. A fruit fly infestation can seem sudden because the complete life cycle may take only about eight to ten days in favorable indoor conditions, according to the University of Wisconsin–Madison Extension.
The strongest clue is the smell and location of the source. Check the fruit bowl, potatoes and onions, recycling, the bottom of the trash can, appliance drip trays, a wet mop, and any bottle or container with a sugary or alcoholic residue. If you keep a vinegar trap beside a plant and catch nothing while flies continue to rise from the soil, stop changing the bait and reassess the identification.
Fungus gnats rise from damp potting mix
Fungus gnats are darker, more delicate, and longer-legged than fruit flies. They make short, fluttery flights around houseplants and windows, and you may see them run across the potting mix before taking off. Adults are mostly a nuisance, but larvae live in the upper layers of moist growing medium and feed on fungi, algae, decaying material, and sometimes fine roots.
Colorado State University Extension reports that larvae are commonly found in the top two to three inches of growing medium and that a fungus gnat life cycle can finish in roughly three to four weeks at ordinary room temperatures. That is why an empty vinegar bowl does not disprove a fungus gnat problem: the adult is not strongly motivated by fermenting fruit, and the damaging stage is underground.
Drain flies look fuzzy and stay near plumbing
Drain flies are small and grayish or brownish, but their bodies and wings are covered in fine hairs, giving them a fuzzy, moth-like appearance. They are weak, erratic fliers and often rest on walls, sinks, tubs, or shower stalls. Their larvae feed in the slimy organic film that coats a drain, overflow channel, trap, or other consistently wet plumbing area.
Virginia Cooperative Extension says drain flies can survive liquid treatments because the larval habitat is protected by the film on the pipe wall. If the insects keep appearing near a sink or shower, a trap that catches a few adults is only a clue. The cure is to find and physically remove the buildup, not to keep pouring stronger liquid into the drain.
Method 1: Apple cider vinegar and dish soap bowl
This is the best all-purpose homemade trap for fruit flies in a kitchen. The vinegar provides the fermentation odor that attracts flies to ripe or decaying food, while a small amount of dish soap helps flies break through the liquid surface instead of landing and flying away.
You need a shallow bowl or jar, about 1/2 to 1 inch of apple cider vinegar or red wine, and two or three drops of ordinary dishwashing liquid. Do not add a large squirt of soap; foam masks the bait and makes the container harder to read. If you want to reduce spills, add plastic wrap over the top and poke several tiny holes with a fork.
Set the trap six to twelve inches from the place where you see the most activity, such as the former fruit bowl or a cleaned recycling area. Keep it away from uncovered food, pets, children, and the edge of the counter. Refresh the bait daily while the catch is high, and discard the contents into a sealed bag or toilet rather than leaving a full jar of insects beside the produce.
The trap is not a substitute for cleaning. UConn Extension recommends pairing a shallow cider-vinegar or wine trap with removal of ripe and rotting fruit, dirty garbage containers, and residue around the sink. Gardening Know How likewise puts sanitation, refrigeration, and disposal of rotting produce ahead of chemical control. If the trap catches adults but the number does not decline after several days, assume a hidden breeding source remains.

Method 2: Paper-funnel fermentation trap
A paper funnel makes a tidier version of the liquid trap because flies can enter the jar but have a harder time finding the opening again. It is useful when you want to avoid plastic wrap or when an open bowl would be easy to tip.
Roll a piece of plain paper into a cone with a small opening at the bottom and tape the seam. Put about an inch of cider vinegar, wine, or a small amount of beer in a jar. Keep the funnel tip above the liquid; it should guide flies toward the bait without becoming a soaked wick. You can add a pea-sized piece of ripe banana or pear, but use only enough fruit to bait the trap for a day.
Place the funnel jar near the active area after removing competing food. Check it after a few hours, then empty and rinse it daily. The funnel is especially helpful when you want to carry the jar outdoors without exposing an open surface, but the same limitations apply: it catches adults and does not remove eggs or larvae hidden in a fermenting potato, bottle, bin seam, or drain.
Use a stable jar with a wide enough mouth to hold the funnel securely. A loose paper cone that falls into the liquid defeats the one-way design and creates a wet, sticky mess. If you see mold, diluted bait, or fruit beginning to decompose, replace it rather than keeping the setup indefinitely; a short-lived trap should not become a new nursery.
Method 3: Ripe-fruit bait jar
When fruit flies ignore plain vinegar but keep circling the fruit bowl, use the smell of real ripe fruit as the lure. Add a small slice of banana, pear, or apple to the bottom of a jar with a tablespoon or two of wine or cider vinegar. Cover the jar with plastic wrap and make several pinholes, or use the paper funnel from Method 2.
This method works best as a one-night decoy, not as a permanent fruit bowl. The purpose is to gather the adult flies after the real produce has been removed or refrigerated. Leave the jar out overnight, inspect the catch in the morning, and discard the fruit and liquid in a sealed bag. Rinse the jar before resetting it with fresh bait.
The University of Wisconsin–Madison Extension notes that ripe bananas, pears, wine, and old wine-bottle residue can capture adult fruit flies, but it also emphasizes that breeding-site removal is the only way to stop a continuing problem. Do not leave a sweet fruit scrap in an open container for several days, especially in warm weather. A trap that is never emptied can shift from capture device to food source.
If you are testing two rooms, use identical jars with the same bait volume and leave them in place for the same length of time. The jar with the higher catch points toward the source, but it does not prove that the nearest object is the breeding site. Use the result to guide a closer inspection of trash, produce storage, recycling, drains, and damp cleaning tools.
Method 4: Yellow sticky card for fungus gnats
For fungus gnats, a yellow sticky card is more useful than a vinegar bowl because it targets the adult flies’ visual behavior near plant canopies and pot rims. Colorado State University Extension recommends yellow sticky cards placed under the plant canopy or along the edge of the container to capture adults and reduce egg-laying.
The cleanest option is a purpose-made yellow card, but a low-cost homemade monitor can be made from a bright yellow index card held beside the pot with a small amount of tacky adhesive. Keep the sticky surface above the soil and away from leaves, stems, and curious pets. A homemade card is a rough monitor, not a tested pesticide product; if the adhesive smears, dries, collects dust, or touches foliage, remove it and use a commercial card instead.
Place one card near the soil line on each suspect pot rather than hanging one across the room. Replace it when the surface is covered or after it becomes dusty. A card with several small dark flies confirms adult activity, but it cannot reach the larvae in the potting mix and will not, by itself, end the infestation. RHS guidance treats sticky traps primarily as monitoring tools within integrated pest management, which is the right expectation here.
The next action is moisture control. Let the top inch or two of growing medium dry between waterings when that is safe for the plant, empty standing water from saucers, and improve drainage. N.C. Cooperative Extension recommends allowing the soil surface to dry, using sticky traps, and considering biological controls such as Steinernema feltiae nematodes or Bacillus thuringiensis subspecies israelensis for larvae when the problem persists.

Do not force a moisture-loving plant to become bone-dry just to make the trap work. Adjust the drying interval to the species, pot size, season, and root condition. If you suspect larvae, Colorado State suggests placing a thin slice or wedge of potato on the potting mix for a few days and checking the underside; larvae may gather there, giving you better evidence than chasing the adults through the room.
Method 5: Clear-tape drain test
This is a detection trap, not a complete drain-fly treatment. Put a strip of clear tape sticky-side down across part of a suspect drain opening, leaving a small gap for airflow. Alternatively, coat the inside of a clear cup with a thin film of petroleum jelly and invert it over the opening overnight. Flies caught on the tape or cup point to that drain as a likely source.
Use the test on one drain at a time so you can tell which opening is active. Check kitchen sinks, bathroom sinks, showers, floor drains, overflow holes, and rarely used drains. Penn State Extension also recommends covering a drain outlet or overflow opening to identify where adults are emerging.
Once you find the source, remove the drain cover and scrub the inside of the opening and accessible parts with a stiff brush. Clean the overflow channel if it can be reached safely, inspect the trap for buildup, and fix slow drainage or leaks. An enzyme or foaming drain product may help maintain a clean pipe, but thick organic film needs physical removal.
Do not count a fly-free morning as proof that the drain is clean. Adult drain flies may rest elsewhere during the day, and larvae can remain protected in the film. Virginia Tech specifically advises against pouring bleach or vinegar down the drain as a control method because those liquids may kill a few exposed larvae without penetrating the buildup.
Choose the method by pest, location, and goal
Use the following rule: fermentation bait for fruit flies, yellow cards for fungus gnats, and a drain test for drain flies. If your goal is simply to reduce visible adults for one evening, a liquid trap or sticky card can help. If your goal is to stop the infestation, the trap must be paired with removal of the material where the insects reproduce.
Choose Method 1 when you have a kitchen swarm and want the simplest recipe. Choose Method 2 when you want a less spill-prone container. Choose Method 3 when ripe fruit is clearly the strongest lure, but empty it each day. Choose Method 4 when flies lift from houseplant soil. Choose Method 5 when fuzzy flies cluster around plumbing or appear in an unused sink.
Do not stack every method at once. A vinegar jar beside the fruit bowl, a sticky card in one plant, and a drain test in the bathroom can be useful when you genuinely have different activity zones. Five baits scattered around a clean room only create clutter and make it harder to identify the source. Start with one test for the dominant location, observe the result for 24 to 48 hours, and then change the plan if the evidence points elsewhere.
Traps to skip or treat with caution
Why a candle-and-water trap is not worth the fire risk
A candle set in a dish of water may attract some flying insects toward light, but it is not a dependable species-specific gnat trap. It also introduces an open flame beside paper, curtains, food, towels, and a busy kitchen counter. A candle should never be left burning while you sleep, leave the room, or try to solve a problem elsewhere.
If you want a light-based adult trap, use a purpose-made enclosed device according to its instructions, and keep it away from water and flammable materials. For ordinary fruit flies and fungus gnats, a correctly matched bait or yellow card is easier to monitor and does not create the same fire hazard.
Why bleach is the wrong drain trap
Diluted bleach is not a shortcut for a drain-fly infestation. The larvae live inside a coating of organic material on the drain wall, so a liquid poured down the pipe can miss the protected breeding layer. Extension guidance from Virginia Tech and Alabama Cooperative Extension System instead points to mechanical removal of the film, cleaning of accessible parts, and correction of leaks or slow drainage.
Never combine bleach with ammonia or another cleaner. Keep all drain products in their original labeled containers, ventilate the area, and follow the product label if you use an enzyme or foaming cleaner. A homemade trap should reduce risk and waste; it should not turn a small fly problem into a chemical exposure or damaged plumbing.
Remove the breeding site after you set the trap
Kitchen sources: fermenting food and residue
Refrigerate very ripe produce, eat it promptly, or discard spoiled pieces in a sealed bag. Inspect potatoes, onions, squash, tomatoes, bananas, and anything stored under or behind the visible fruit bowl. Wash the bowl, the counter beneath it, and the seam or shelf where juice may have leaked.
Rinse recycling bottles and cans, wash the bottom and lid of the trash can, and empty food scraps from the kitchen compost container. Look under appliances, inside blender gaskets, beneath a coffee station, in lunch bags, and around a garbage-disposal splash guard. A wet mop, sour-smelling cloth, or forgotten bottle can support fruit flies even when the rest of the kitchen looks clean.

After the cleanup, keep one trap in the area that had the most activity. A declining catch is useful evidence; a full trap every morning means the search is not finished. If the kitchen is clean but flies keep returning from a wall, shared trash room, floor drain, or plumbing cavity, document the location and ask building management, a plumber, or a pest professional to investigate.
Houseplant sources: damp soil and larvae
Move a suspect plant away from the rest of the collection and place a yellow card near the pot rim. Check whether the mix stays wet for days, whether the container drains freely, and whether water sits in a saucer. Let the top layer dry as the plant tolerates, but do not use a rigid calendar or dry-out rule for seedlings, fresh cuttings, or plants that genuinely require even moisture.
Fungus gnats often indicate a moisture-management problem rather than a failure of the adult trap. Reduce watering only after checking the plant’s actual root and soil needs. If the mix has broken down and stays wet, repotting into a well-draining medium may be more effective than adding more traps. Remove dead leaves, rotting roots, and other decaying material from the soil surface.
Adults caught on a card are a progress signal, not proof that the larvae are gone. If activity persists for several weeks after the surface is drying and watering has been corrected, consider extension-backed biological controls or ask a local extension service for plant-specific guidance. Avoid pouring dish soap, vinegar, bleach, or an untested home brew into the pot; a trap for adult flies should not damage the roots.
Drain sources: slime, overflow channels, and leaks
Drain flies need a wet, organic film, so inspect places that are easy to overlook: the underside of a stopper, the pivot rod behind a sink drain, the overflow opening, the drain trap, a shower cover, a floor drain, a refrigerator or air-conditioner drip pan, and the area under a leaking pipe. The Alabama Cooperative Extension System lists slow drainage, bubbling, and foul odors as clues that a breeding site may be present.
Scrub accessible slime with a stiff brush, clean the removable parts, and use an enzyme or foaming maintenance product only as directed. Run water in rarely used drains weekly to maintain the trap seal, dry damp areas, and repair leaks. If flies come from behind a wall, under a slab, a sewage-related area, or an inaccessible pipe, stop experimenting with household liquids and call a qualified professional.
Conclusion
The most useful homemade gnat trap is the one that matches the insect. Use apple cider vinegar and dish soap, a paper funnel, or a short-lived ripe-fruit jar for kitchen fruit flies; use a yellow sticky card and moisture correction for fungus gnats; and use clear tape or an inverted cup to locate drain flies before scrubbing the breeding film.
Every trap in this guide catches or confirms adult activity. None removes the eggs and larvae that keep an infestation going. Remove fermenting food, let plant soil dry as the plant permits, clean drain biofilm, and watch for a steady drop in catches over the next several days. If the insects do not match the trap or the count does not decline, change the diagnosis before you add more bait.



