Where Do Flies Lay Their Eggs? (And How to Prevent It From Happening In Your House)

Written by Hannah Ward
Published: April 24, 2023
Share on:


With at least 120,000 known species, flies are some of the most common animals in the world. They are able to survive in a wide variety of habitats and conditions. One species — the Antarctic midge — is the only fly to live in the harsh environment that is Antarctica. Flies are also well-known for their ability to reproduce quickly. This is largely down to the vast quantities of eggs that they lay. In fact, if you’ve ever found a sudden increase in the number of flies in your home then you’ve probably wondered where they’ve come from. So, where do flies lay their eggs? Let’s discover their favorite egg-laying locations, and find out how to prevent it from happening in your house!

What are Flies?

True flies have a single set of wings. Their hind wings are modified into a set of small organs known as halteres which are used for balance.

Flies are members of the Diptera order and are distinguished by having only a single set of wings.

©Abel Tumik/Shutterstock.com

Although there are many insects which are commonly called flies, only members of the order Diptera can be classified as true flies. Although their size and shape differs between species, true flies can be distinguished from other flies as they possess only a single set of wings. Their hind wings have become modified into a set of halteres which are used for balance. Halteres are small organs which are able to provide flies with information about the rotation of their body during flight. They are then able to use this information to correct the position of their body and stabilize themselves.

Although flies are often regarded as pests, they are important pollinators too. In fact, despite not being as efficient as bees, they still manage to perform around 30% of the world’s pollination! Some plants — such as skunk cabbage and corpse flowers — smell like rotting animals specifically so they can attract pollinators such as blowflies.

Where Do Flies Lay Their Eggs?

Flies on rotten food.

Flies lay their eggs on decaying material such as rotten fruit, garbage, or dead animals.


Flies lay their eggs in warm, moist areas such as decaying plant matter, rotten food, garbage, animal faeces, and carrion.

With so many different species of flies around in the world it would be easy to assume that there are a vast number of places that they will lay their eggs. Although some flies lay their eggs near to water, most flies lay their eggs in these few select locations. However, they have a strong preference for any kind of decaying material. Flies deliberately lay their eggs in these places so that their larvae can feed as soon as they hatch. Different types of flies often have a further preference for where they lay their eggs, such as fruit flies which prefer to lay their eggs on rotten fruit. Blowflies have a preference for rotten meat or animal carcasses, while drain flies typically lay their eggs in drains and pipes.

Reproductive Process of Flies

Flies lay their fertilized eggs in batches consisting of 75 to 200 eggs. They lay further batches over a period of a few days. In total one female can lay an immense 500 eggs. When the eggs hatch the larvae, commonly called maggots, emerge. The maggots have thin, worm-like bodies and need to eat so that they can grow. When the maggots emerge they immediately begin to eat the material that they have just hatched out onto. Decaying matter is typically easier for maggots to break down and consume than living cells are. Maggots need to eat a lot of food. This is so that they can go grow and go through three molts before becoming a pupa.

It usually takes eight to 10 days for maggots to undergo their molts, after which they become pupae. Pupae remain dormant in a hard shell known as a puparium. They do not eat during this phase and emerge after approximately three or four days as adult flies.

How to Prevent Flies Laying Eggs in Your Home

Flies are attracted to things such as rotten fruit and garbage.

Prevent flies from laying eggs in your home by removing any left over food.


Having flies in your home is never nice. Aside from being a nuisance as they buzz around, they can carry and spread diseases. However, the last thing you want is for them to start reproducing in your home, especially considering the number of flies that they can produce in every batch. Luckily, there’s a few steps that you can take to prevent flies from laying their eggs in your home.


First of all, the most effective method is to remove anything that would attract the flies or be an ideal place for them to lay their eggs. This means you should keep your kitchen clean and free from leftover food. You should also avoid leaving out any fruit or vegetables that are starting to spoil. Plus, you should regularly remove leftover garbage and seal the bags well to prevent flies from getting into them. Also, keep pet bowls free from leftover food and regularly clean litter boxes. Flies are less likely to lay their eggs in your home if they have no where to lay them! Furthermore, you can try prevent flies from getting into your home by closing doors and windows or by using close fitting screens.


If the above methods don’t work or you want an added layer of protection then you can set out traps or use repellents to deter them. Although there are several chemical-based repellents that you can use to kill or repel flies in your home, natural methods are also popular — especially if you have pets or children. If this is your preferred method then there are several strong-smelling herbs that are effective at repelling flies — such as lavender and basil. You could even purchase a Venus fly trap to help you catch and kill any unwanted insects in your home!

The photo featured at the top of this post is © iStock.com/guraydere

Share on:
About the Author

Hannah is a writer at A-Z animals where her primary focus is on reptiles, marine life, mammals, and geography. Hannah has been writing and researching animals for four years alongside running her family farm. A resident of the UK, Hannah loves riding horses and creating short stories.

Thank you for reading! Have some feedback for us? Contact the AZ Animals editorial team.