Housefly Behaviours and Control Tips

The housefly is probably the most common urban flying pest. To eliminate housefly problems and prevent infestations, it pay to know a bit about housefly behaviour and the various control options…

Many Australians would consider Australia to be the fly capital of the world. There are some 30,000 species of fly in Australia, with the bush fly, filth flies (including the housefly) and flesh flies being amongst the most familiar to pest managers. Although the bush fly (Musca vetustissima) may be the fly of most annoyance outside, as it buzzes around people’s faces looking for moisture, it is the similar-looking but larger housefly, Musca domestica that is the focus of most pest control activities. With its close association with human activity, and its ability to transfer a variety of diseases, it’s more than just annoying.

Although pest managers are very familiar with houseflies, that familiarity sometimes means the understanding of fly behaviour and the knowledge of the variety of control methods is taken for granted. Here we review some key elements of housefly behaviour and provide a summary of the main fly control measures.


Housefly pest status

In the urban area, houseflies will breed in garbage storage areas, which means they readily enter nearby buildings. They become both annoying and a health threat as they land on food and food preparation surfaces.

Houseflies are known to carry over 130 pathogens. A majority of these are bacteria with the main group being enteric (gut) bacteria. Although it is known that houseflies carry bacteria such as E. coli and Salmonella and do deposit them on the food and surfaces on which they land, actually proving that they transfer enough of the bacteria to actually cause illness is somewhat problematic. Nevertheless, with their close association with garbage and manure, the fact they are called ‘filth flies’ is well deserved and is the reason why homeowners and owners of food management facilities place a high priority on keeping their homes and businesses fly free.


Housefly life cycle

Houseflies undergo complete metamorphosis from egg to larva (maggot) to pupa to adult. They can complete the life cycle in 1-2 weeks, with the adults only living between two and  four weeks. The life cycle shortens with increasing temperature, and it is common for eggs laid in domestic garbage bins to develop into late-stage maggots within a week. The larva moves away from moist material to pupate. In cooler climates, the housefly will commonly overwinter in the pupal or adult stage.

Houseflies lay their eggs in variety of soft, decaying organic matter. Manure and animal faeces are preferred, although decaying vegetable matter and kitchen waste/garbage are attractive alternatives. The maggots feed directly on this organic matter.

Adult houseflies will eat a wide variety of organic foods. Due to their spongy, sucking mouthparts they can only eat liquid food, so for solid food they have to regurgitate digestive juices onto the food before sucking up the juice.

Housefly larva
Housefly larvae


House fly pupa
Housefly larvae move to drier areas to pupate


Key behaviours

  • Houseflies are only active during the day and inside will tend to rest on ceilings or high on walls at night.
  • Adult flies require food before they mate, and female flies require a protein meal before laying eggs.
  • Houseflies lay their eggs in a wide range of organic material including manure, carrion, compost, decaying vegetable matter and garbage.
  • Adult houseflies can fly up to 8 km/h and disperse up to 12 km, which means breeding sites may not be on the property.


Housefly attractants

Houseflies are attracted to light, particularly UV light of wavelengths between 310-370 mm.  Like other insects, flies cannot see light in the red spectrum (which is why a red filter on a torch is a good idea if you want to view insects without disturbing them). Researchers have found that flies are attracted to blue colours far more than yellow colours and that indeed, sometimes yellow seem to repel flies. This is somewhat surprising given than many fly traps on the market are yellow!1 Researchers also found that black vertical lines also appear to attract flies.

Flies are attracted to a wide range of food materials, especially those releasing volatile compounds. Recent research has identified a new type of receptor on housefly sensilla that is uniquely sensitive to ammonia. Given the importance of locating large animals and animal waste, this makes sense from an evolutionary point of view.2

(Z)-9-Tricosene is one of the sex pheromones that female houseflies release to attract males for mating. The substance is used in products such as traps and ‘fly paper’ strips to attract male flies, although success is somewhat variable.


Prevention measures

Eliminating fly breeding sites is a key first step. Garbage should be placed in well-sealed bins and placed away from buildings. The use of manure, compost and straw mulch in gardens should be avoided. Dog faeces should be picked up regularly.

As breeding sites beyond the property boundary cannot be controlled, exclusion from buildings is a key element of any housefly management plan. As with many outdoor pests that move inside, exclusion can be very effective. Fly screens on windows deliver 100% protection! Doors can be more problematic, as even with a good flyscreen, the opening and closing of the door provides the opportunity for flies to enter. In a commercial situation it can be even more problematic as many openings do not even have doors. However, air curtains can provide good exclusion depending on their location. Laboratory trials have shown that units mounted vertically on both sides of a doorway can exclude 98-100% of house flies at speeds as low as 4 m/s.3


Non-chemical control techniques

Fly swats may be old school, but if customers want a non-chemical way to deal with the occasional intruder, the fly swat is the best option.

Sticky fly paper hung vertically has long been a traditional way of dealing with houseflies. They work as flies are attracted to vertical hanging objects as a place to land. Certainly, the traps can be effective at trapping flies, although they are not really a standalone solution. Some also contain other visual and chemical attractants. Whilst such products can certainly be an option when cheap, pesticide-free options are needed, they are very unattractive and certainly wouldn’t be a good idea in commercial premises where customers may be present.

A range of hanging traps on the market use food attractants that lure the flies in before they drown in the water. Although they do trap flies, they are unsightly and start to smell after a while! UV light traps are the preferred professional fly trap for commercial accounts.

Light traps, which either kill flies by electrocution or through trapping them on a sticky board, are a key component of fly control programs, especially in commercial accounts. The performance of the various traps is greatly dependent on the quality of the bulbs i.e. the frequency and intensity of the light emitted.

Although not an option in most accounts, it is interesting to note that light traps in poultry houses captured ten times more flies when at floor level than when mounted at a height of 1.5 metres. Furthermore, that housefly activity was greatest at and just after sunset.4 Whilst placement at floor level may not be possible, the lower the better. It’s also important to avoid competing light sources; bright though the UV bulbs may be, it is still pretty hard to compete with sunlight coming through a door or window! Other suitable placements would be near potential fly food sources or breeding sites, such as inside the doors leading to outside garbage areas. Placement near entrances can be a good idea to intercept incoming flies, but avoid areas with bright light and high airflow.


Sticky fly paper
Sticky fly paper


UV light fly trap
UV light fly trap


Chemical fly control products

Space sprays

The use of space sprays to eliminate houseflies in a room is a standard control method for homeowners. Closing doors and windows and spraying the aerosol into the air to create a cloud of insecticide, before leaving the room and closing the door, is the standard label instruction. With aerosols designed to produce droplets with a long hang time, this tends to be a little easier than chasing a fly around a room to attempt a direct spray. The principle is the same when professionals fog/mist a room, although this would not be a common control method, except for in cases of heavy infestation.

Automatic aerosols

Timed-released aerosols, which generally release pyrethrum (rather than pyrethroids), can be an option, especially in domestic situations and smaller areas. Such devices tend to use pyrethrum due to its short residual so there is no build-up of insecticide on surfaces. They can be used in commercial areas, but more than one device will be required for larger areas. In areas of high insecticide use (e.g. around farming areas), where there are significant levels of resistance to pyrethroids in houseflies, the effectiveness of such aerosols may be limited.

Surface sprays

Residual insecticides sprayed on the surfaces where houseflies rest can provide long-lasting control. Garbage areas and the nearby external walls of buildings should be targeted in particular.

Fly baits

Baits can also be a great option for fly control. As with all bait products, there is variation in the food matrix and active, which can impact performance. Once the fly has landed, the bait will provide the fastest and most reliable kill, although they can pick up a lethal dose through direct contact and later ingestion whilst grooming. The speed of kill will depend on the dose and the active, although most baits will achieve kill within an hour.5 The same study indicated a significant drop off in performance over a two-week period due either to active degradation, a loss of attraction, or both.

Housefly control is not difficult, but due to the plentiful breeding locations off-site and long dispersal distances, complete eradication is virtually impossible. It really does require a multi-pronged management strategy to minimise housefly numbers and exclude them from the inside of a building.


1 J. W. Diclaro, II, L. W. Cohnstaedt, R. M. Pereira, S. A. Allan, P. G. Koehler, Behavioral and Physiological Response of Musca domestica to Colored Visual Targets, Journal of Medical Entomology, Volume 49, Issue 1, 1 January 2012, Pages 94–100,

2 Vulpe, A., Kim, H. S., Ballou, S., Wu, S. T., Grabe, V., Nava Gonzales, C., Liang, T., Sachse, S., Jeanne, J. M., Su, C. Y., & Menuz, K. (2021). An ammonium transporter is a non-canonical olfactory receptor for ammonia. Current biology : CB31(15), 3382–3390.e7.

3 Bidlingmayer, W.L. Mosquito penetration tests with louver screening. Fla. Entomol. 195942, 63–67

4 Hinkle, N.C.; Hogsette, J.A. A Review of Alternative Controls for House Flies. Insects 202112, 1042.

5 Parker, C.; Baldwin, R.; Pereira, R.; Koehler, P. Evaluation of Cyantraniliprole and Other Commercial Fly Baits under Laboratory and Field Conditions. Insects 20156, 977-987.