Things That Attract Flies and How to Get Them to Buzz Off

Bye-bye, flies

A view of produce on a counter in a white kitchen
Photo: Thomas Barwick / DigitalVision / Getty Images
A view of produce on a counter in a white kitchen
Photo: Thomas Barwick / DigitalVision / Getty Images
Alison Kasch
Written by Alison Kasch
Contributing Writer
Updated July 21, 2022

Highlights

  • Flies breed in damp areas with rotting organic material.

  • Food messes, pet food, and food scraps will attract flies inside your home.

  • Open trash cans and rotting organic matter will bring flies to your outdoor space.

  • Help control flies by eliminating breeding and feeding areas around your home.

Get quotes from up to 3 pros!
Enter a zip below and get matched to top-rated pros near you.

Whether they’re buzzing through your backyard or darting around your home, flies are a never-ending annoyance that we all must face. While it often feels like they come out of nowhere, there’s a simple answer to how they breed (and how they feed). Here’s what attracts flies—and what you can do to get them to stop bugging you.

Common Types of Flies

There are a variety of different types of flies that are attracted to people, animals, and rotting organic matter. Some, including the house fly and blue bottle fly, can even carry diseases and harmful bacteria like E. coli. Here are the main types that could be buzzing around your home:

  • Fruit fly: Tiny round and elongated body (less than 1/8” long), yellowish-brown

  • Gnat: Similar in size to a fruit fly, but with an elongated dark gray/black body and dangling legs

  • Drain fly: Tiny tan body (1/16th of an inch long)

  • Blue bottle fly: Iridescent blue body

  • Flesh fly: Light gray checkerboard body

Where Do Flies Come From?

Flies have a penchant for the dark, damp, and rotten. To lay eggs, females hunt for places like garbage cans, fecal matter, dumps, and rotten organic material. Trash cans are a particular favorite, as they are dark and filled with food scraps and other decaying organic matter. Once she’s found a suitable place, a female fly can lay as many as 500 eggs in several batches over a few days. 

Things like food messes and decaying food scraps in the trash will feed flies, making your home seem like a bed and breakfast. They can quickly sneak in through a door left ajar, and they can easily find their way inside through holes in window screens. Keeping them out means maintaining a clean home, replacing broken window screens, and eliminating all other points of entry.

What Attracts Flies Inside?

There’s a reason that flies are so ubiquitous—they only need dampness and rotting organic matter in order to breed and thrive. As such, they naturally gravitate towards a few things.

  • Leftover food and drinks: If you’ve forgotten about your leftover soup cooling on the counter or the soda you spilled before dinner, you can expect flies to find them for you if you don’t act quickly.

  • Overripe/rotting produce: Those lemons currently rotting in your fruit bowl could be attracting flies. 

  • Pet droppings and pet food: As if you needed another reminder to pick up after your pet, their feces can attract flies. The same goes for their food, so be sure to keep a lid on it.

  • Open alcohol containers: If you dare to take a sip out of a bottle of wine that sat out uncovered all night, you might just encounter a fly. Gross.

  • Open garbage cans: Your trash can and everything in it (i.e., rotting meat and icky leftovers) can be a hotspot for flies. 

  • Scum and residue in drains or garbage disposals: This stuff doesn’t just look gross when it builds up; it can also attract flies.

11 things that attract flies, including sugary messes, standing water, and mulch
Photo: Jin Yeong Kim / Unsplash

What Attracts Flies Outside?

Whether or not they’ve got an outdoor barbecue to crash or an innocent animal to bug, flies always seem to be buzzing about pretty much any outdoor space. While it’s impossible to keep them out entirely, being mindful of their habits can help you identify what’s attracting them. 

Doggie droppings, standing water, and rotting organic matter will all invite flies to your outdoor space. Things such as compost piles, outdoor trash cans, decaying plants, and even mulch can all make your outdoor space irresistible. If you’re having a fly problem, do a walkthrough of your property and note any issues you can address. 

How to Get Rid of (Or at Least Control) the Flies Around Your Home 

A man throws out garbage
Photo: lovelyday12 / Adobe Stock

There are millions of flies for every human on Earth, so there’s only so much you can do to combat their rude presence. At the very least, there are ways to help keep flies out of your space (and out of your face). Here are the best ways to control the number of flies both in and around your home:

  • Avoid throwing food scraps away indoors—if you do, be sure to take the trash out every couple of days.

  • Clean up food spills and messes immediately.

  • Avoid leaving out fruit and sugary messes (especially if you’re trying to get rid of gnats and fruit flies).

  • Use sticky paper and fly traps to catch flies around the house.

  • Use tight-fitting lids on trash cans.

  • Clean and sanitize trash cans regularly.

  • Promptly remove dead or decaying plants and fruit.

  • Keep compost piles far away from your doors, windows, and outdoor living areas.

  • Encourage natural predators by adding bird and bat houses, birdbaths, and birdfeeders.

  • Clean up pet waste ASAP.

  • Repair cracks, broken screens, and other potential entry points.

Need professional help with your project?
Get quotes from top-rated pros.
Learn more about our contributor
Alison Kasch
Written by Alison Kasch
Contributing Writer
Alison is a Chicago-based writer who has spent the last seven years focusing her content on everything inside and outside the home.
Alison is a Chicago-based writer who has spent the last seven years focusing her content on everything inside and outside the home.
The homeowners guide to Pest Control
From average costs to expert advice, get all the answers you need to get your job done.