What Causes a Stye in Your Eye: Risks and Prevention

A stye forms when bacteria, almost always Staphylococcus aureus, infect one of the tiny oil glands or hair follicles along your eyelid margin. The result is a painful, red, swollen bump that looks a bit like a pimple and usually comes to a head within a few days. Most styes resolve on their own, but certain eyelid conditions, skin disorders, and everyday habits make some people far more prone to them than others.

How a Stye Actually Forms

Your eyelids are lined with dozens of small glands that produce an oily substance helping to keep your tear film stable and your eyes lubricated. When one of those glands gets blocked, bacteria that normally live harmlessly on the skin surface can multiply inside the clogged duct and trigger an acute infection. Staphylococcus aureus is the dominant culprit, capable of infecting structures across the entire eye, from tear ducts to the eyelid to deeper chambers.1Europe PMC / Pathogens. The Pathogenesis of Staphylococcus aureus Eye Infections

Doctors distinguish between two types based on which gland is involved. An external hordeolum affects a lash follicle or one of the smaller oil glands (Zeis or Moll glands) near the eyelash line, so the bump sits right at the lid edge. An internal hordeolum involves a meibomian gland deeper inside the eyelid, so the swelling may point inward toward the eye or present as a deeper, more diffuse lump. Both types are caused by bacterial infection, but internal ones are more likely to linger or develop into a chronic, painless lump called a chalazion if the blockage doesn’t clear.2PubMed Central. Non‐surgical interventions for acute internal hordeolum

Eyelid Conditions That Set the Stage

Some people seem to get styes over and over, while others go their whole lives without one. A big part of that difference comes down to the baseline health of the eyelid’s oil glands.

Meibomian gland dysfunction (MGD) is one of the most common underlying problems. When the meibomian glands become obstructed or start losing functional cells, the quality and quantity of the oil they produce changes. That altered oil doesn’t flow as freely, which means glands stay blocked longer and give bacteria a better foothold.3Europe PMC / Ophthalmology. Meibomian Gland Disease: The Role of Gland Dysfunction in Dry Eye Disease MGD is extremely widespread, especially in older adults and people who spend long hours staring at screens (blinking less means the glands express oil less often).

Blepharitis, a chronic low-grade inflammation of the eyelid margins, is closely related and often overlaps with MGD. If your lids are chronically red, crusty, or irritated at the lash line, the environment is primed for styes. Another overlooked contributor is Demodex, a microscopic mite that lives in eyelash follicles. In a study of recurrent chalazia (the chronic cousin of styes), Demodex mites were found in about 73% of affected eyes. When those patients were treated with tea tree oil to reduce the mite population, the success rate for preventing recurrence was roughly 97%.4PubMed. Ocular demodicidosis as a risk factor of adult recurrent chalazion That’s a striking number, and it suggests that in people who keep getting eyelid bumps, a Demodex check is worth asking your eye doctor about.

Rosacea and Recurring Styes

If you have rosacea, the flushing skin condition that causes redness across the cheeks and nose, your eyes may be more affected than you realize. Ocular rosacea is a well-recognized extension of the disease, and styes and chalazia are among its hallmark signs. One large survey of rosacea patients in Germany found that among those reporting eye symptoms, about 77% had experienced a stye or chalazion.5PubMed. Clinical clues to identify patients with ocular rosacea – a Germany-wide epidemiologic analysis Patients with ocular rosacea commonly present with chronic red eyes, blepharitis, and frequent styes as early signs of ongoing inflammation.6PubMed Central. Ocular Rosacea: An Updated Review

The connection makes sense mechanistically. Rosacea involves chronic inflammation of blood vessels and surrounding tissue, and that inflammation extends to the eyelid glands. The meibomian glands become inflamed, their secretions thicken, and the stage is set for repeated blockages and infections. If you’re dealing with rosacea and you also keep getting styes, treating the underlying rosacea (with oral or topical medications your dermatologist prescribes) can reduce the frequency of eyelid flare-ups considerably.

Does Diabetes Raise Your Risk?

This is one of those questions where the intuitive answer and the evidence don’t line up neatly. Diabetes impairs immune function and blood flow, so you might expect it to increase susceptibility to styes. But a cohort study that specifically looked at the association between diabetes, blood sugar control, and various eye infections found no connection between diabetes and styes or chalazia.7PubMed. The association between diabetes, level of glycaemic control and eye infection: Cohort database study The study did find associations with other types of eye infection, but styes weren’t among them.

That doesn’t mean diabetes plays zero role in eyelid health. People with diabetes are more likely to have dry eye and blepharitis, both of which are themselves risk factors. But the direct causal link that many health websites imply between diabetes and styes is weaker than it sounds. If you have diabetes and keep getting styes, the culprit is more likely an underlying lid condition like MGD or blepharitis than your blood sugar alone.

Everyday Habits That Raise (or Lower) Your Risk

Beyond medical conditions, some of the most common stye triggers are behavioral. You have more control over these than you might think.

  • Touching your eyes: Your hands carry bacteria constantly, and rubbing or touching your eyelids transfers those bacteria directly to the gland openings. This is the single most preventable risk factor.
  • Old or shared cosmetics: Mascara, eyeliner, and eyeshadow brushes accumulate bacteria over time. Using expired eye makeup or sharing products with others introduces new organisms to the lid margin. Replacing mascara every three months or so and never sharing eye products are standard recommendations from eye care professionals.
  • Sleeping in makeup: Leaving eye makeup on overnight keeps the gland openings partially sealed, encouraging blockage and giving bacteria hours of undisturbed growth.
  • Poor contact lens hygiene: A survey of contact lens wearers found that about 46% exceeded the recommended replacement schedule, roughly 30% slept in their lenses, and only about 17% cleaned their lenses daily.8Europe PMC. Prevalence, habits and outcomes of using contact lenses among medical students These habits introduce bacteria to the ocular surface and increase inflammation, which can contribute to eyelid infections alongside the more commonly reported complications like red eye and corneal abrasion.

None of these habits guarantee you’ll get a stye, but they shift the odds. If you’re someone who gets recurrent styes and also routinely touches your eyes or sleeps in your contacts, those habits are worth addressing before assuming you have an underlying medical problem.

How Styes Differ from Chalazia

People often use “stye” and “chalazion” interchangeably, but they’re distinct conditions that call for different approaches. A stye (hordeolum) is an acute infection: it shows up suddenly, hurts, and is red and swollen. A chalazion is a chronic, usually painless lump that forms when a blocked gland triggers a granulomatous inflammatory reaction rather than an outright infection.9PubMed. The lowly chalazion

The practical difference matters because a stye often responds to warm compresses and time, while a chalazion that persists beyond a month or two may need a steroid injection or a minor in-office procedure to drain it. An unresolved stye can also transition into a chalazion: the acute infection calms down, but the blocked gland remains, leaving a painless but persistent nodule.2PubMed Central. Non‐surgical interventions for acute internal hordeolum So if your “stye” stops hurting but doesn’t go away, it may have become a chalazion, and the treatment strategy shifts accordingly.

When a Bump Deserves a Closer Look

Most eyelid bumps are benign, but a recurring lump in the same spot warrants attention. Sebaceous gland carcinoma, a rare but serious eyelid cancer, can masquerade as a chalazion. It typically presents as a small, firm nodule that looks nearly identical to one, and a majority of these cancers are initially misdiagnosed as chalazia.10PubMed Central. Sebaceous Gland Carcinoma of Lid: Masquerading as a Recurring Chalazion

The red flags to watch for are a lump that keeps coming back in exactly the same location after treatment, loss of eyelashes near the bump, or a bump that changes in size or appearance over weeks. Older adults are at higher risk, and the diagnosis requires a biopsy. This isn’t meant to make you panic about every eyelid bump, but it is a reason not to ignore one that repeatedly recurs in the same spot, especially if you’re over 50.

Prevention Through Lid Hygiene and Warm Compresses

The most effective prevention strategy for people prone to styes is consistent eyelid hygiene. That means keeping the lid margins clean and the oil glands flowing. A warm compress applied to closed eyelids for five to ten minutes helps soften hardened oil in the glands and encourages drainage. However, how you deliver that warmth matters more than you might expect.

A standard warm washcloth cools down quickly. One study comparing a purpose-built eyelid warming device to traditional compresses found that the device maintained therapeutic temperature (at or above 38°C) for an average of 7.5 minutes, while a regular compress dropped below that threshold after just one minute. The warming device also produced measurable improvements in eyelid redness and corneal signs, while the traditional compress actually increased conjunctival redness slightly.11PubMed Central. A comparison of an eyelid-warming device to traditional compress therapy You don’t necessarily need a specialized device, but the takeaway is clear: if you’re using a washcloth, reheat it frequently. A compress that has cooled to room temperature isn’t doing much.

Beyond compresses, daily lid scrubs with diluted baby shampoo or commercially available lid wipes can reduce the bacterial load along the lash line. For people with blepharitis or MGD, these scrubs are a long-term maintenance habit, not a one-time fix. Some eye care providers also recommend gentle lid massage after warming, pressing along the lid from the base toward the lash line to physically express oil from the meibomian glands.

Omega-3 Fatty Acids and Gland Health

There’s growing interest in whether dietary supplements can help keep the eyelid glands healthy. Omega-3 fatty acids have gotten the most attention, and the theory is straightforward: the oil produced by meibomian glands is partly composed of fatty acids, so changing the dietary fat profile might change the composition of meibum for the better.

A systematic review of omega-3 supplementation for meibomian gland dysfunction found early evidence that supplementation can shift the ratio of omega-6 to omega-3 fatty acids in red blood cells and plasma, with corresponding improvements in tear film stability and meibum quality.12PubMed Central. A systematic review of the effect of omega-3 supplements on meibomian gland dysfunction The evidence is still in its early stages, but the direction is encouraging, and omega-3 supplements are low-risk for most people. If you already deal with dry eyes or meibomian gland issues, adding an omega-3 supplement is a reasonable adjunct to lid hygiene, not a replacement for it.

When to See a Doctor Instead of Waiting

Most styes don’t need medical intervention. Warm compresses a few times a day, keeping the area clean, and avoiding the temptation to squeeze or pop the bump is usually enough to let it resolve within a week or so. But certain situations call for professional evaluation:

  • Spreading redness or swelling: If the redness expands beyond the immediate bump and starts involving the surrounding eyelid or cheek, the infection may be spreading to deeper tissues. Periorbital cellulitis is uncommon but requires prompt antibiotic treatment.
  • Fever or vision changes: These suggest the infection has moved beyond the superficial gland. Seek care promptly.
  • A bump that lasts longer than a month: At that point, it’s likely a chalazion rather than an active stye, and it may benefit from steroid injection or incision and drainage.
  • Recurrence in the same location: As noted, this warrants evaluation to rule out less common causes, particularly in older adults.

Antibiotic eye drops or ointments are sometimes prescribed for styes, though their role is debated. The infection is typically walled off inside the gland, which limits how well topical antibiotics can reach it. Oral antibiotics are reserved for cases where the infection is spreading or where there’s a concurrent systemic condition like rosacea driving repeated episodes. Choosing the right treatment depends on identifying both the causative organism and the specific structure involved.13PubMed Central. Anterior ocular infections: an overview of pathophysiology and treatment

For children, who get styes relatively often, the management is the same: warm compresses and patience. Parents sometimes worry about styes spreading from one child to another. While the Staph bacteria involved are technically transmissible through shared towels or pillowcases, styes themselves aren’t highly contagious in the way pink eye is. Basic hygiene precautions, like not sharing face towels, are sufficient.