How to keep flies out of the house

Put a stop to these pests. This is how to keep flies out of the house

Keep flies out of the house
(Image credit: Alamy)

Wondering how to keep flies out of the house? Flies are more than a nuisance if they start buzzing around inside – they can also make you sick by contaminating both surfaces and food.

‘The common housefly can transmit the pathogens that cause shigellosis, typhoid fever, E. coli, and cholera,’ says the NEHA (National Environmental Health Association).

To help you avoid disease as well as nuisance we’ve put together an expert guide to how to keep flies out of the house.

How to keep flies out of the house

Many of the methods you can use to get rid of fruit flies can be employed to prevent house flies breeding and infesting your home. Here’s how to keep flies out of the house.

‘House flies, if not controlled properly, can easily turn into an infestation,’ says Natasha Wright MS BCE, board certified entomologist and technical director for Braman Termite & Pest Elimination. ‘Over its 20 day adult life span, one female house fly can lay around 900 eggs.’

1. Secure garbage cans

To keep flies out of the house first make sure you’re not attracting them to the yard. ‘Ensure the lids on garbage cans are secure and tight fitting to prevent the attraction of flies,’ says certified entomologist and Orlando-based national technical manager of Truly Nolen Mike Duncan. Clean garbage cans out regularly, too.

2. Locate compost away from the house

House flies breed in decaying organic matter so as well as paying attention to garbage cans, think about home composting areas, too. ‘These should be located as far from the house as possible, or ensure the compost lids are on tight,’ says Mike.

3. Deal with pet poop

It’s no secret that flies are attracted to poop (more of the decaying organic matter they like) and so, if you have animals, clean up after them. Flies lay their eggs in feces, making speedy removal of potential breeding sites essential. 

4. Secure the house

To keep flies out of the house, check where they might be getting in. ‘A homeowner should take a walk around their home and look at the screens on the house,’ recommends Mike Duncan. ‘Screens that are more durable are those made with aluminum, plastic, or fiberglass. 

‘Check to ensure gaps around doors and windows are caulked to prevent entry around them. Check door sweeps on the bottom of doors for gaps and replace if needed. 

‘Check soffit areas for openings that would allow wildlife to enter the attics and/or crawlspaces. These areas can be screened off. Frequently, wildlife will get into these areas and possibly die, thereby allowing for the perfect breeding ground for flies.’

5. Adopt precautions inside your house

Keep flies away with a few simple strategies indoors. 

Just like outside, make sure the garbage bin has a secure lid, and never let it overflow. Rinse it regularly, too.

Clean up food and drink spills immediately, and don’t leave dirty dishes, glasses or old soda cans around. Wipe down countertops and remove any crumbs from the floor. 

Store food in airtight containers, and don’t leave any uncovered (the same goes for outside).

Keep sink drains and garbage disposals clear of food debris. 

6. Deter and control house flies

‘Preventing fly infestations includes meticulous sanitation,’ says Natasha Wright. ‘The goal is to prevent the creation of attractive feeding and breeding areas.’ 

However, you could still encounter adult flies or those from locations you can’t control inside your home, and so deterrents could be helpful. 

‘There are natural ways to repel flies, such as citronella candles and certain types of plants like clove, pine and lavender,’ says Irene Pomares, pest control specialist at Fixr.

Alternatively, invest in fly control measures. ‘There are fly baits and aerosols that can be purchased,’ says Mike Duncan. ‘One should be sure to read the entire label for proper locations for treatment and directions for use,’ he adds.

7. Call in the pros

Be aware that you might need to call in the pros to control an infestation of flies. This may involve different stages. ‘While sprays and fogs can kill multitudes of flies, we have found that those treatments alone may be ineffective,’ says Natasha Wright. ‘Killing adult flies does not stop the infestation. The breeding sites and the immature stages must be found and eliminated. 

‘We often recommend a bioremediation foam product containing natural scum and odor-eating microbes. Once applied, it expands and coats the breeding surface, gradually digesting the decaying organic matter.’

What scent keeps flies away?

Citronella can keep flies away – especially on occasions such as when you’re dining outdoors. They are also said to be deterred by mint, and eucalyptus oil. 

Other scents that you’ll like, but they are said not to, include basil, cloves, lavender and cinnamon. 

The best way to keep flies away, though, is to avoid attracting them in the first place by securing garbage cans and compost, not leaving food uncovered, or crumbs and spills on surfaces, plus cleaning up pet waste.

What causes a lot of flies in the house?

The common housefly is one of the most widely distributed insects and found around the world including throughout the US, so it’s no surprise that there’s the potential for a lot of them to be found in the house.

The key to avoiding lots of flies in the house is control. Getting rid of the decaying organic matter in which they breed is crucial, as well as keeping them out with screens and by eliminating gaps.

Sarah Warwick
Sarah Warwick

Sarah is a freelance journalist and editor. Previously executive editor of Ideal Home, she’s specialized in interiors, property and gardens for over 20 years, and covers interior design, house design, gardens, and cleaning and organizing a home for H&G. She’s written for websites, including Houzz, Channel 4’s flagship website, 4Homes, and Future’s T3; national newspapers, including The Guardian; and magazines including Future’s Country Homes & Interiors, Homebuilding & Renovating, Period Living, and Style at Home, as well as House Beautiful, Good Homes, Grand Designs, Homes & Antiques, LandLove and The English Home among others. It’s no big surprise that she likes to put what she writes about into practice, and is a serial house renovator.