Are Fruit Flies Attracted to Light?

Are fruit flies attracted to light? Explore the fascinating behavior of these tiny insects and discover the answer. Fruit flies are known for their affinity towards light, but what exactly is the reason behind this attraction?

In this article, we will delve into the scientific explanations behind fruit flies’ attraction to light and shed light on this intriguing phenomenon.

Are Fruit Flies Attracted to Light?

Yes, fruit flies are attracted to light. They have a natural instinct to seek out light sources. This behavior can be explained by their innate attraction to bright areas which they perceive as open spaces, compared to dark areas that appear confined. It is believed that this light-seeking behavior helps fruit flies to navigate and find food sources.

Additionally, light sensitivity in fruit flies is regulated by photoreceptor cells in their eyes, allowing them to detect and respond to light stimuli. However, it is important to note that the specific response to light may vary among different species of fruit flies.

Overall, the attraction of fruit flies to light is a well-documented phenomenon that can be utilized for pest control and trapping purposes.

Why Are Fruit Flies Drawn to Light?

  1. Phototaxis: Fruit flies exhibit positive phototaxis, a natural behavior to move towards light sources as they use them for navigation and finding food.
  2. Escape from heat: Fruit flies seek light sources to escape heat, as they are attracted to warmer environments which can provide favorable conditions for mating and reproductive activities.
  3. Ultraviolet sensitivity: Fruit flies have a heightened sensitivity to ultraviolet light, which is emitted by many artificial light sources. This sensitivity makes them more attracted to lights.
  4. Disruption of circadian rhythm: Artificial lights can disrupt the circadian rhythm of fruit flies, which affects their sleep patterns and feeding behavior. This disturbance can draw them towards light sources.
  5. Visual perception: The compound eyes of fruit flies have specialized photoreceptor cells that are most sensitive to blue and ultraviolet light. This preference for certain wavelengths draws them towards light sources.
  6. Role of pigments: Fruit flies possess pigments that allow them to detect and respond to light. These pigments help them identify suitable sources for nutrition, contributing to their attraction to light.
  7. Environmental cues: Fruit flies rely on visual cues to locate food sources. Artificial lights can stimulate their foraging behavior, leading them to be drawn towards light as a potential source of food.
  8. Genetic factors: Genetic variations in fruit flies can influence their attraction towards light. Certain genes and mutations regulate their phototactic behavior, making some individuals more drawn to light than others.
  9. Evolutionary advantage: The attraction of fruit flies to light might have provided an advantage in their natural habitats, such as locating fruit or flowers that emit light-like signals indicating a food source.
  10. Reproductive advantage: Light can enhance the mating behavior and courtship displays of fruit flies. Therefore, their attraction to light sources may be driven by the increased chances of successful reproduction.

What Color Light Attracts Fruit Flies the Most?

If you’re curious which color and type of light attracts fruit flies the most, then these are the ones they like and dislike!

UV-A Light Attraction:

Fruit flies are highly attracted to UV-A light (365-400nm), which is emitted by many types of artificial lighting, including fluorescent lights and certain LED lights.

Blue Light Attraction:

While fruit flies are strongly attracted to UV-A light, they also show a significant attraction to blue light (400-490nm), which is commonly emitted by LED lights used in homes and commercial buildings.

Avoidance of Red and Yellow Light:

Fruit flies have been observed to avoid red and yellow light, as these longer-wavelength lights are less attractive to them compared to shorter-wavelength lights.

Light Intensity:

Besides wavelength, light intensity also affects fruit fly attraction. Higher intensity lights are generally more attractive to fruit flies.

What Else Attracts Fruit Flies?

Of course, light isn’t the only thing that is going to attract fruit flies to your home. As well as light, here are some of the most common attractants of fruit flies!

1. Overripe fruits and vegetables:

Fruit flies are attracted to the sweet scent emitted by overripe produce.

2. Fermented foods and drinks:

The odor of fermented substances like beer, wine, and vinegar attracts fruit flies.

3. Organic decaying matter:

Fruit flies are drawn to decomposing organic matter like rotting plant material or food scraps.

4. Moist or wet areas:

Fruit flies thrive in damp environments, making wet areas like drains and garbage disposals attractive to them.

5. Poor sanitation:

Neglected cleanliness can lead to a buildup of organic debris, creating favorable conditions for fruit flies to breed.

6. Houseplants:

Fruit flies may be attracted to the fungi, algae, or rotting plant material in indoor potted plants.

7. Trash cans and recycling bins:

The presence of decaying food or sugary residues can appeal to fruit flies.

8. Unsightly messes:

Any unclean or unattended area can potentially harbor fruit flies if it provides food or moisture sources.

9. Cleaning products:

Some fruit flies are attracted to the fragrance of cleaning agents or scented items like air fresheners.

Are Fruit Flies Attracted to Light Traps

Fruit flies are attracted to light traps. Light traps are designed to mimic natural light sources, which fruit flies are naturally drawn to.

When fruit flies see a light source, they instinctively move towards it. This behavior is thought to be a result of their evolutionary adaptation to find new food sources and mates. By being attracted to light, fruit flies are more likely to come across ripe fruit or other food sources that may be present near light sources, such as our homes.

Light traps take advantage of this behavior by using artificial light sources to lure and trap fruit flies. These traps typically use UV light, as fruit flies are especially sensitive to this spectrum. The UV light emitted by the trap attracts the fruit flies, who then fly towards the light source and become trapped in the device.

Great Light Trap Alternatives

1. Sticky Traps

Sticky traps are adhesive surfaces that attract and trap insects. They can be used indoors or outdoors and are effective for catching a variety of flying insects without the need for electricity.

Landisun Fruit Fly Sticky Traps 48PCS Fungus Gnat Traps Bug Traps Gnat Killer for Indoor Outdoor House Kitchen Plants Whitefly Mosquitos Flying Insects JPM0149 Yellow Designed by JPMOS
  • Yellow Sticky Traps — Bright yellow color attract flying insects, and high quality glue keeps them from escaping. Specially designed for flying plant pests. Great for outdoor or indoor plant, especially potted plants.

2. UV Light Traps

UV light traps use ultraviolet light to attract insects, which are then trapped in a container or killed by an electric grid. They are commonly used for larger spaces and in outdoor areas.

Catchmaster Vector 15, UV Light Fly Traps Indoor for Home, Electric Gnat Traps for House Indoor, Shatterproof Bulbs UV Lamp Fly, Insect & Mosquito Killer, Silent Bug Light for Kitchen, Shed, Garage
  • INDUSTRIAL STRENGTH UV TRAP: Catchmaster’s Insect Vector 30 Light Trap is remarkably discreet and undemanding to maintain. It’s made with airplane-grade aluminum and an industrial-strength design for increased durability. This outdoor and indoor fly trap for home comes with a replaceable glue board and 2 shatter-protected 15-Watt bulbs.

3. Essential Oils

Certain essential oils like peppermint, citronella, and lemongrass have insect-repelling properties. Mixing them with water and spraying the solution around areas prone to insects can act as a natural deterrent.

SVA Japanese Peppermint Essential Oil 4 Oz – 100% Pure, Natural & Premium Therapeutic Grade for Diffuser, Skincare, Haircare, Body Massage, Aromatherapy, Soaps & Candles
  • PREMIUM THERAPEUTIC GRADE JAPANESE PEPPERMINT OIL: SVA Japanese Peppermint Essential Oil is obtained by steam distillation extraction of Mentha Arvensis herbs. It is 100% Pure & Natural, Authentic essential oil. It is not tested on Animals. We care for you!

4. Fly Paper

Fly paper consists of sticky strips that hang from ceilings or walls and trap flies and other flying insects. They are inexpensive, easy to use, and readily available in most stores.

Black Flag Fly Paper, Insect Trap, Catches All Flying Insects 4 Traps
  • Controls all flying insects: Traps houseflies, mosquitoes and other flying insects

5. Bug Zappers

Bug zappers use electric grids or light to attract insects, which are then electrocuted upon contact. They are effective in outdoor areas but may also attract beneficial insects, so proper placement is crucial.

GOOTOP Bug Zapper Outdoor Electric, Mosquito Zapper, Fly Traps, Fly Zapper, Mosquito Killer, 3 Prong Plug, 90-130V, ABS Plastic Outer (Black)
  • Effectively eliminate most flying insects: mosquito, Aedes, gnats, midges, flies, horse flies, fruit flies, house flies, moths, wasps, etc. Please use this exterminator at night and in the dark.

6. Natural Predators

Introducing natural predators like birds, bats, or ladybugs can help control insect populations. For example, installing birdhouses or bat boxes can encourage them to make your surroundings their home.

7. Mesh Screens

Installing mesh screens on doors and windows acts as a barrier, preventing insects from entering your living spaces while allowing fresh air to circulate.

Windows Screen and Screen Door Replacement, 48″x118″ Durable Fiberglass Screen Mesh- Window Screen & Sliding Screen Door Repair for Patio and Windows, Tooltriz
  • 【Durable Window Screen】This window screen made of fiberglass mesh, its Radial strength is above 320N/Inch, weight above 110g/m2.

Overall, these alternatives offer effective ways to control and reduce insect populations without relying on traditional light traps.


Here are some frequently asked questions people have about whether fruit flies are attracted to light!

1. Do fruit flies prefer light or dark?

Fruit flies are attracted to light. They tend to gravitate towards sources of light, which includes both natural and artificial lighting.

2. Are fruit flies attracted to yellow light?

Yes, fruit flies are attracted to yellow light. They find it particularly appealing and are often drawn to sources of yellow lighting.

3. Are fruit flies attracted to LED lights?

Yes, fruit flies are attracted to LED lights as well. They are not specific to a particular type of lighting and can be drawn to various sources of artificial light, including LED lights.


Now you know that fruit flies are attracted to light, however, on top of light, there are other more noticeable things that will attract fruit flies, most notably, whether or not you have left fruit out!

If you liked this article, make sure you check out the rest of the website! Otherwise, have a great day!

Leave a Comment