Fly and mosquito traps work by exploiting the specific sensory cues each insect uses to find food, hosts, or shelter. The catch is that flies and mosquitoes are attracted to different things, so the best trap for your situation depends on which pest you’re dealing with, whether you need it indoors or outdoors, and how much area you need to cover.
How These Traps Attract Insects
Mosquitoes locate you primarily by the carbon dioxide you exhale, along with body heat and chemical compounds on your skin. Traps designed for mosquitoes mimic these signals by releasing CO2, emitting heat, or dispersing a chemical called octenol that mimics human skin odor. Some combine all three for a stronger pull.
Flies respond more strongly to light. Ultraviolet light in the 360 to 370 nanometer range is the sweet spot for attracting houseflies, and traps built around standard blacklight bulbs outperform those using the dimmer “blacklight blue” variety. Flies are also drawn to food odors and fermentation, which is why a piece of rotting fruit on a kitchen counter becomes a landing strip within hours.
Because these insects respond to different cues, a single trap rarely handles both equally well. UV light traps excel at catching flies but do little for mosquitoes. CO2-based traps pull in mosquitoes effectively but won’t do much about the houseflies buzzing around your garbage can. Some commercial products combine UV light with CO2 or heat to bridge the gap, but even then, one pest usually gets caught more than the other.
Types of Traps and How They Work
UV Light Traps
These are the most common indoor option. A UV bulb draws insects toward the trap, where they’re either electrocuted on a charged grid or stuck to a glue board. Glue board models are quieter and don’t scatter insect fragments the way zappers do, making them a better fit for kitchens and dining areas. They’re highly effective against houseflies, fruit flies, and moths but pull in very few mosquitoes on their own.
CO2 and Attractant Traps
Outdoor mosquito traps typically burn propane to generate CO2, or use a combination of CO2 canisters and chemical lures. These are the most effective option for mosquitoes specifically. Coverage varies by model, but a typical residential trap covers around 1,500 square feet of shaded yard. Many manufacturers recommend placing two traps to improve catch rates across a full property.
Fan-Based Traps
Some traps use a small fan to create a downdraft that sucks insects into a collection chamber once they get close. These are often paired with UV light or CO2 lures. The advantage is that captured insects dehydrate and die in the chamber without electrocution, making them safer and quieter.
Traditional Bug Zappers
The classic blue-light zapper hanging on a back porch is one of the least effective options for mosquitoes. Research from Rutgers University found that biting insects make up less than 1% of everything a zapper kills in a typical night. The vast majority of the catch consists of beneficial insects like beetles, moths, and midges that play roles in pollination and pest control. If mosquitoes are your target, a zapper is largely a waste of electricity.
DIY Yeast and Sugar Traps
The most popular homemade mosquito trap uses a cut plastic bottle, warm sugar water, and a gram of yeast. The yeast ferments the sugar and produces CO2, which attracts mosquitoes into the inverted bottle neck where they can’t easily escape. It’s cheap and simple to build: dissolve 50 grams of sugar in 200 milliliters of hot water, let it cool to lukewarm, add the yeast, and wrap the outside in dark plastic or tape.
The limitation is duration. CO2 output from a yeast trap drops from about 60 milliliters per minute to essentially zero within 30 hours, and the trap’s attractant properties fade noticeably between 38 and 48 hours after setup. In field testing, mosquito catches plateaued by the seventh day regardless of sugar type. You’ll need to refresh the solution every two to three days to keep it working.
These traps also perform dramatically better outdoors than indoors. In one study, outdoor traps caught more than twice as many mosquitoes as identical traps placed inside. That makes sense: outdoors is where mosquitoes are actively searching for CO2 plumes. Interestingly, about 25% of the mosquitoes caught in the study had already fed on blood, meaning the trap was also removing mosquitoes that had already bitten someone and could potentially spread disease.
Where to Place Your Trap
Placement matters as much as the trap itself. For mosquito traps, position them between where mosquitoes breed or rest and where you spend time. Mosquitoes shelter in shaded, humid spots: under trees, in mulched garden beds, along the shaded side of your house. Placing a trap in these areas intercepts mosquitoes before they reach your patio or deck, rather than luring them closer to where you’re sitting.
For indoor fly traps, put them near entry points like doors and windows, or close to where flies congregate (kitchens, trash areas, pet feeding stations). Avoid placing UV traps directly next to food prep surfaces, since they’ll draw flies toward that zone. A few feet away, positioned so the light is visible from the entry path, works better.
Height matters too. Mosquito traps work best at or near ground level where mosquitoes fly. Fly traps perform better when mounted at roughly the height flies cruise, typically 4 to 6 feet off the ground.
Indoor Safety
Modern indoor traps using UVA LED light in the 365 to 395 nanometer range produce no ozone, no chemical fumes, and no odor. This wavelength is non-ionizing, similar to what you’d encounter from a nail curing lamp, and is considered safe for household use around children and pets. Most current models run on low voltage (12 volts or less) and use either insulated grids or glue boards instead of exposed electrified wires, eliminating the spark and smell issues that older zappers were known for.
If you have young children or curious pets, a glue board model is the safest choice since there’s no electrical grid to touch at all. Just make sure the glue boards are replaced regularly, as a full board stops catching effectively and can start to smell.
Choosing the Right Trap for Your Situation
- Indoor flies (houseflies, fruit flies): A UV light trap with a glue board is your best option. Quiet, safe, and effective. For fruit flies specifically, a simple vinegar trap (apple cider vinegar with a drop of dish soap in a jar) works surprisingly well as a supplement.
- Outdoor mosquitoes: A CO2-based trap with octenol lure provides the strongest pull. Place it in a shaded area 20 to 30 feet from your seating. Expect it to take several days to weeks to noticeably reduce the local mosquito population, since the trap needs to intercept breeding females over multiple cycles.
- Outdoor flies: Baited fly traps using food-based attractants (often a protein bait that smells terrible) catch large numbers of houseflies and blowflies. Keep these well away from seating areas because of the odor.
- Budget option for mosquitoes: The yeast and sugar bottle trap costs almost nothing and catches real numbers of mosquitoes, but requires refreshing every two to three days and works best outdoors.
- Mixed pests, indoors: A fan-based trap with UV light handles both flies and the occasional mosquito that wanders inside. It won’t replace an outdoor mosquito strategy, but it’s a good all-purpose indoor defense.
No single trap eliminates every flying pest. The most effective approach pairs traps with basic source reduction: emptying standing water where mosquitoes breed, keeping trash sealed to discourage flies, and using screens on windows and doors to limit how many insects get inside in the first place.