8 Ways Flies Get Into Your House And How To Get Rid Of Them

by | Flies, Insects

This post contains affiliate links: Full Disclosure 

Flies are terrible pests that often come into people’s homes. If you have flies in your house, you’re probably wondering how they got in…

Flies usually get into houses when people open their doors or windows. But there are many other ways for flies to get in, such as through cracks in walls or tears in insect screens. People and pets often carry flies or fly eggs in without knowing it.

There are many types of flies, but if any of them think there is food or a better climate in your home, you will have a hard time keeping them out. Knowing why flies come into your house and all the ways they get in will help you to stop them from coming in and kill them if they do.

Below I’ve put together a list of the top 8 ways that flies get into houses.

Flies get in houses through doors or windows

Photo of an open window that shows the most common way flies get into a house

Most flies get into a house from the outside by flying in through an open window or door. Flies only need a small opening in a door or window for a few seconds to sneak inside, and you probably won’t even see them take the gap.

The most common flies you will find in your house are house flies – click here to find out how to identify house flies.

If you keep all your doors and windows closed but flies still get in, check to make sure that there are no tears in your insect screens, holes around the door or window frames, damaged weather stripping, or broken windows. Flies, especially young flies and small fly breeds, can squeeze through tiny holes – even between the strands of fly screens.

Flies want to get into your house for a few reasons:

  • Food: Flies can smell food in your house that they like to feast on, such as garbage, regular food, spilt drinks, drain scum, clogged or dirty garbage disposal drains, a cat litter box, alcohol, or vinegar. They want to get inside to taste and eat this food.
  • A better climate: When you open a door or a window, nearby flies feel a gust of cool wind from your air conditioning unit or warm air coming from your home. If these flies think the temperature is nicer inside your house than it is outside, they follow the air into your house.
  • Light and warmth: Flies often spend a lot of time flying against glass sliding doors and windows. They do this for the light they see and the warmth they feel when they are there. When you open the door or window, or they find a gap, they let themselves in.
  • To survive winter: Flies thrive where it’s warm and they don’t like very cold temperatures or winter, which can make them go into a state of hibernation or kill them off. When winter is near, flies, especially female flies, will try to get into your home because your house offers them what they need – a place to lay eggs, food to eat, and warm hiding places where they can live out the rest of their lives (usually a few weeks) in peace.

Flies get inside through cracks and gaps

Flies sometimes get into houses through cracks and gaps, like openings around plumbing and pipes, vents, cracks in foundations, holes in air conditioner filters or cracks around the unit, damaged ceilings, or holes in the roof.

These flies usually find such an opening by chance: Because there are so many flies flying around outside, buzzing around your house for many hours of the day, at some point one or two will find their way in through a gap.

Once inside, these flies look for food or somewhere to lay eggs.

Chances are they will never find the same gap where they came in, so they will either spend the next two to four weeks of their life in your house until they die or they will find another way out.

Flies hatch from eggs inside your house

Sometimes flies don’t enter your house because they’re already inside. This happens when adult flies lay their eggs in your house or you bring their eggs into the house without knowing it, and the first sign you see of an infestation is crawling maggots or a bunch of new flies in your home.

If one female fly finds her way into your home and there’s a food source, there’s a good chance she will lay eggs in there. And if your house is nice and warm, say between 77 and 86°F (25 and 30°C), maggots hatch from these eggs within a day.

Photo of maggots showing them as white worms that will be adult flies within 5 to 6 days
These maggots hatched from fly eggs. If you see maggots in your house or on your property, it means that flies are laying eggs nearby.

Each day for four days, the female fly lays batches of eggs. By the end of the week, you could have up to 500 hatched eggs in your house!

So that gives you up to 500 maggots in your house within a week, if all of them survive. These maggots become adult flies in five to six days, and the young females start laying their own eggs.

This is how you end up with a lot of flies inside your house in a very short time.

If you think flies are laying eggs in your house, you need to find out where the eggs are being laid. Check dark, moist areas where there is food and moisture for the maggots to survive. Flies have been known to lay their eggs in:

  • Garbage or trash cans that don’t seal properly
  • Kitchen appliances used to make food and drinks, especially those with small openings that flies can crawl into and find food and moisture. Check the old coffee grounds in your coffee machine, the vents in multicookers or steamers, toasters, ovens, etc. Some flies are deterred by coffee, but not all of them.
  • Cat litter boxes
  • Diaper bins

Here’s a list of places flies lay eggs and what flies these maggots become, so you know where to look for them.

You bring flies into your home

Sometimes you, your family members, visitors, or pets unknowingly bring flies into the house.

A fly could be sitting on the person or pet, or be hiding in luggage, a backpack, a handbag, or in school bags.

Flies, eggs and maggots (fly larvae) can also be carried into the house on shoes, clothing, food, fresh cut flowers, or the soil used for potted plants.

Flies come into your home with pests

Any pest that moves into your home, such as squirrels or rats, can bring flies with it. Flies catch a ride on pests or follow them into your garage, attic, or basement. They eat and lay eggs in the pest’s feces and feed on any food scraps that the animal drops.

If an animal dies in your home, under your crawl space or inside a wall or fireplace, or if your cat brings in a dead lizard, mouse or bird, and you don’t find or remove the carcass quickly, you are sure to get a fly infestation.

Female flies will hurry over to lay their eggs on the dead animal so their maggots have something to eat when they hatch. And many flies, including carnivorous blow flies that eat meat, will find a way in to eat the rotting meat.

Flies get into apartments through duct work

If you have flies in your apartment, then they probably came in through the building’s duct work. Flies enter the duct work system through vents or gaps, and they fly through the tubes until they find a way out and into your or someone else’s apartment.

But you might also have carried in the flies unknowingly or let flies in through open doors and windows. Remember that it only takes one female fly to find her way into your apartment and to start laying eggs for you to get a serious fly infestation in your apartment.

Drain flies come in by your pipes and plumbing

Drain flies love to eat and breed in sewage, and they are attracted to a house that has stagnant water in pipes or organic matter growing on the inside of house drains and storm drains.

Drain flies follow the smell of organic matter and stagnant water, which is why they might be attracted to your house. They don’t enter a house through the pipes, but they look for gaps around the house’s plumbing and pipes to find a way in.

Click here to find out how to identify drain flies and how to get rid of them.

Flies come in on fruits and vegetables

Flies in the kitchen eating fruit

Any time you bring fresh fruits or vegetables into your home, there’s a chance you might carry flies, eggs, or maggots in with them. Some flies, especially fruit flies, enjoy eating and breeding in these types of foods.

You could find these flies on fruits and vegetables that you bought from chain stores, outdoor markets, or even those you grow and pick from your own garden.

Once inside, these flies spread to other foods in your home and multiply very quickly.

How to get rid of flies in the house

If you need to get rid of flies in your home, you’ll find a list of the best tips and recommended products from Amazon to get the job done quickly:

  • Go through your home and inspect the areas outside your windows and doors. Clean up any garbage, mulch, dead animals, animal droppings, food, stagnant water, or anything else that might be attracting flies. Close any gaps in the walls or roof, where flies might be getting in.
  • Get garbage bins that seal properly, so there’s no way flies can get into them and lay eggs. Take out the trash more often than you usually do, to see if this helps.
  • Make sure there are no holes in your window or door screens. If you like leaving your doors and windows open and you don’t have any fly screens, hang one of these magnetic screen doors or magnetic screen windows to stop flies from coming in.
  • Make sure all alcohol and vinegars in your house are free from spills, sealed tightly, and packed away. Flies are attracted to these substances.
  • Hang these fly traps outside, at least 20 feet from your doors and windows. One of these traps will kill up to 40,000 flies by attracting them to the trap and then drowning them. They are disposable so clean up is quick and easy.
  • Take all potted plants and fresh cut flowers outside. Gently overturn the top layer of soil in the pots to expose fly eggs. Leave the pots or flowers out in the sun or cold to kill any eggs or maggots.
  • Fix leaking faucets or pipes and remove stagnant water (starting with the tray under the refrigerator) from your home. Pour this gel drain cleaner into your floor drains, garbage disposal, sink drains, stormwater drains, and any other drains or pipes on your property. It will quickly kill fruit flies, drain flies, and sewer flies living and breeding in there.
  • Remove or get a professional in to remove any dead animal or animal pest in your garage, crawlspace, roof, wall, or attic that is attracting flies. If you don’t want to pay for this and you can’t get to the dead animal yourself, be prepared to wait out the fly problem for about 10 days until the flies have eaten what they can and the animal is left with only skin and bones.
  • Sprays and insecticides aren’t a good option for killing flies inside a house. These sprays will spread poison around your home and flies breed so quickly that you won’t be able to keep up with them. Instead, keep one of these electric fly swatters nearby to kill flies that fly past you. Or leave these traps on to attract and catch annoying flying insects in your home (without the poisons).

I'm Monique. I love gardening and spending time in my backyard growing things. Here's where I share what I know about backyard pests and what to do about them, so you can enjoy your yard too.

Legal stuff heading

Backyard Pests participates in the Amazon Services LLC Associates Program, the ShareASale affiliate program, and other affiliate programs. This means that if you buy a product or service through one of our links, we may receive a small commission from the sale for referring you. Thank you for your support!


Monique loves gardening and spending time in her backyard, where she grows flowers, succulents, herbs, fruits, and vegetables.

Monique spends a lot of time researching how to protect her backyard from harmful pests and trying to attract beneficial insects and animals.

She shares everything that she learns and tests here at Backyard Pests.


4 Ninja Ways To Find Where Maggots Come From

4 Ninja Ways To Find Where Maggots Come From

If you have maggots, you need to locate the source as quickly as possible so you can kill them before they turn into flies. But there are many, if not hundreds, of places in your home and on your property where maggots could be hatching from fly eggs. Below is my list...

read more