Styes form when bacteria infect one of the tiny oil or sweat glands along the edge of your eyelid, and the culprit is almost always Staphylococcus aureus, a bacterium that commonly lives on skin and mucous membranes. But the infection itself is usually the final step in a chain of events that starts with a blocked gland, and the list of things that can set up that blockage is longer and more varied than most people realize.
The Bacterium Behind Nearly Every Stye
Your eyelids are lined with dozens of small glands that produce oils and fluids to keep your eyes lubricated. When one of those glands gets plugged, the stagnant material inside becomes a breeding ground for bacteria. Staphylococcus aureus is the dominant pathogen in eye infections involving the eyelid, and it is well adapted to colonizing the structures around the eye, from the tear duct and eyelid margin to the conjunctiva and cornea.1Europe PMC. The Pathogenesis of Staphylococcus aureus Eye Infections Most healthy adults carry S. aureus on their skin without problems. The trouble starts when the bacterium gains access to a blocked or inflamed gland, where it can multiply in a warm, sealed-off pocket and trigger the red, swollen, painful bump you recognize as a stye.
A stye on the outer edge of the eyelid, near the base of an eyelash, involves the Zeis or Moll glands. One that forms deeper inside the lid, closer to the inner surface, involves a meibomian gland. Both types hurt and look similar to the untrained eye, but the deeper internal stye tends to be more painful and slower to resolve. Either way, the infectious agent is typically the same.
What Blocks the Glands in the First Place
The meibomian glands run vertically through the cartilage-like tissue of your upper and lower eyelids. Each one produces a thin, oily secretion called meibum that spreads across the surface of your tears and prevents them from evaporating too quickly. When these glands become sluggish or obstructed, the condition is known as meibomian gland dysfunction. The oil thickens, the gland openings clog, and the backed-up secretion creates an environment ripe for bacterial overgrowth.2PubMed Central. Evaporative dry eye disease due to meibomian gland dysfunction: Preferred practice pattern guidelines for diagnosis and treatment
Meibomian gland dysfunction is extremely common, and many people have it without realizing. If you notice that your eyes feel gritty or dry, or that your eyelid margins look slightly crusty or reddened in the morning, you may already have some degree of gland obstruction. This chronic, low-grade blockage is one of the most significant risk factors for developing styes, because it means the glands are perpetually on the verge of getting fully plugged. Standard recommendations for managing the dysfunction include warm compresses, gentle lid massage, and keeping the eyelid margins clean.2PubMed Central. Evaporative dry eye disease due to meibomian gland dysfunction: Preferred practice pattern guidelines for diagnosis and treatment
Demodex Mites and Recurring Styes
If you keep getting styes and cannot figure out why, microscopic mites called Demodex may be part of the answer. Two species live on human skin: Demodex folliculorum, which burrows into hair follicles including eyelash follicles, and Demodex brevis, which prefers the sebaceous glands of the eyelid, including the meibomian glands.3PubMed Central. Pathogenic role of Demodex mites in blepharitis Most people carry some Demodex without symptoms. The problems emerge when the population grows large enough to physically clog glands and provoke chronic inflammation.
A comparative study of people with recurrent styes found Demodex in about 60 percent of those patients, versus roughly 18 percent in a control group without recurrent styes.4Scientific Reports. Clinical characteristics of Demodex-associated recurrent hordeola: an observational, comparative study The difference was striking enough that the researchers flagged Demodex screening as something clinicians should consider when a patient’s styes keep coming back. Adults were more affected than children in the study: nearly 69 percent of adult patients with recurrent styes tested positive for the mites, compared with about 38 percent of the pediatric group.4Scientific Reports. Clinical characteristics of Demodex-associated recurrent hordeola: an observational, comparative study
D. folliculorum tends to cause inflammation along the front edge of the eyelid, disturbing the eyelashes, while D. brevis digs into the meibomian glands and can trigger deeper dysfunction and inflammation of the conjunctiva.3PubMed Central. Pathogenic role of Demodex mites in blepharitis In practical terms, if you have been told you have blepharitis (chronic eyelid inflammation) along with recurrent styes, a Demodex infestation is one of the less obvious but treatable explanations worth investigating with your eye doctor.
Rosacea and Chronic Eyelid Inflammation
Rosacea is usually thought of as a skin condition that causes facial redness and flushing, but it frequently involves the eyes. Ocular rosacea can produce meibomian gland dysfunction along with recurring styes and chalazia, diffuse redness of the conjunctiva, sensitivity to light, and in severe cases, corneal damage.5PubMed. Rosacea: The eyes have it The eyelid involvement can even show up before the more visible skin symptoms, which means some people get diagnosed with recurring styes long before anyone connects the pattern to rosacea.
If you notice that your styes coincide with facial flushing, visible blood vessels across your cheeks or nose, or a tendency for your skin to react badly to heat and spicy food, it is worth mentioning the full picture to a dermatologist or ophthalmologist. Treating the underlying rosacea with anti-inflammatory therapy can reduce the frequency of styes significantly, rather than just treating each bump as a one-off infection.
Contact Lens Habits That Raise Your Risk
Wearing contact lenses does not guarantee you will develop a stye, but certain habits dramatically increase the odds of bacterial contamination reaching your eyelid glands. A cross-sectional study of university students found that showering or swimming while wearing lenses, sharing lenses with other people, exceeding the recommended replacement schedule, and inconsistent use of contact lens solution were all significantly linked to ocular complications.6PubMed Central. The Prevalence, Usage Patterns, and Complications of Contact Lens Use Among University Students in Damascus, Syria: A Cross-Sectional Cohort Study
Even the lens solution itself is not guaranteed sterile. Research examining commercial contact lens preservation solutions found bacterial contamination across products, with Pseudomonas aeruginosa and Staphylococcus epidermidis being the most common organisms detected. The study also found a much higher rate of infections among people who wore lenses for 24 hours straight compared to those who wore them for shorter periods.7Integrative Biomedical Research. Risks, Identification, and Antibiotic Susceptibility Against High Prevalence of Bacterial Infection in Contact Lens Solutions The practical takeaway is straightforward: replace your lenses on schedule, never sleep in them unless they are specifically designed for overnight wear, wash your hands before handling them, and replace your lens case regularly.
Everyday Habits That Set You Up for Styes
Beyond specific medical conditions and lens care, several mundane behaviors can tip the balance toward a blocked, infected gland:
- Touching your eyes: Rubbing your eyes with unwashed hands is the simplest route for S. aureus and other skin bacteria to reach the eyelid margin. Most people touch their faces dozens of times a day without thinking about it, and any contact near the lash line pushes bacteria closer to gland openings.
- Old or shared cosmetics: Mascara, eyeliner, and eyeshadow sit directly on or near the eyelid glands. Products that are months old can harbor bacterial growth. Sharing eye makeup transfers one person’s bacterial flora to another’s eyelids.
- Incomplete makeup removal: Going to sleep with eye makeup on allows product residue to settle into gland openings overnight, physically blocking them in the same way that thickened meibum does.
- Poor sleep and stress: While stress does not directly infect a gland, sleep deprivation and prolonged stress suppress immune function broadly. If your immune system is already managing a heavy bacterial load on the eyelid margin, a dip in immune surveillance can be the difference between a gland that clears itself and one that becomes a stye.
None of these habits is exotic or unusual, which is partly why styes are so common. Most adults will experience at least one in their lifetime, and the ones who get them repeatedly often have a combination of predisposing factors rather than a single dramatic cause.
Hormones and the Oil Glands in Your Eyelids
The meibomian glands are sensitive to hormonal signals, particularly androgens. Research has established that sex hormones play a significant role in regulating how these glands function, influencing both the quantity and quality of the oil they produce.8PubMed Central. Androgen and meibomian gland dysfunction: from basic molecular biology to clinical applications When androgen levels drop, as happens during menopause or with certain anti-androgen medications, the meibomian glands tend to produce less oil and function less efficiently. This connection helps explain why dry eye disease and eyelid problems become more common in postmenopausal women.
Conversely, hormonal surges during puberty and pregnancy can increase sebaceous gland activity across the body, including the eyelids. That extra oil production can sometimes overwhelm the gland’s ability to drain, leading to blockages. The hormonal angle is worth keeping in mind if your styes seem to cluster around specific life stages or menstrual cycles, since it suggests the underlying gland dysfunction may respond to strategies that address hormonal imbalances rather than just treating each stye individually.
Air Pollution and Eye Irritation
Outdoor air quality is not something most people think about in relation to styes, but environmental pollutants create a chronic low-grade insult to the ocular surface that can contribute to gland dysfunction. Airborne particulate matter, nitrogen dioxide, sulfur dioxide, and ozone all irritate the outer layer of the eye, promoting redness, burning, dryness, and inflammation.9PubMed Central. The Adverse Effects of Air Pollution on the Eye: A Review Research from high-pollution environments found that commuters who traveled on open vehicles like motorcycles and scooters for more than a decade had noticeably more ocular surface symptoms than people who lived close to their workplace and had less exposure.9PubMed Central. The Adverse Effects of Air Pollution on the Eye: A Review
The connection to styes is indirect but real. Chronic irritation from pollution drives inflammation along the eyelid margins, and inflamed glands are more prone to obstruction. If you live in a high-pollution area or spend long hours commuting in open air, protective eyewear and a regular eyelid-cleaning routine are practical defenses that go beyond just treating symptoms after they appear.
Does Diabetes Increase Your Risk?
There is a widespread belief that diabetes makes styes more likely, which seems logical on the surface. Diabetes impairs immune function and increases susceptibility to various infections, so styes should follow the same pattern. However, a cohort study that specifically examined the relationship between diabetes, blood sugar control, and eye infections found no significant association between diabetes and styes or chalazia.10PubMed. The association between diabetes, level of glycaemic control and eye infection: Cohort database study The study did find associations between diabetes and other types of eye infections, but styes were not among them.
This does not mean that immune suppression is irrelevant to stye formation. People undergoing chemotherapy, taking long-term corticosteroids, or dealing with other conditions that weaken immunity do appear to be more susceptible to skin and soft-tissue infections broadly. But diabetes specifically, despite its reputation, has not been shown to be an independent risk factor for styes in the evidence available. If you have diabetes and keep getting styes, the cause is more likely to be one of the other factors discussed here rather than the diabetes itself.
When It Is Not Actually a Stye
A hard lump on your eyelid is not always a stye. Chalazia look similar but arise from a different process. A stye is an acute infection: it appears quickly, hurts, and often has a visible pus-filled head near an eyelash or on the inner lid surface. A chalazion is a chronic inflammatory cyst that forms when a meibomian or Zeis gland becomes obstructed and the trapped secretion triggers a granulomatous reaction rather than an outright bacterial infection.11PubMed. The lowly chalazion Chalazia tend to be painless or mildly uncomfortable, grow more slowly, and feel firm rather than tender.
The distinction matters because the treatments differ. A stye generally resolves with warm compresses and sometimes topical antibiotics. A chalazion may linger for weeks or months and sometimes requires a steroid injection or minor surgical drainage. Styes can also evolve into chalazia: if the infection resolves but the blocked gland material remains trapped, the leftover debris can harden into a chronic cyst. Knowing the difference helps you avoid the frustration of applying stye remedies to something that was never going to respond to them.
Other conditions occasionally mistaken for styes include sebaceous gland carcinoma, a rare eyelid cancer that can masquerade as a recurring chalazion, and preseptal cellulitis, a more serious infection of the tissue surrounding the eye. A stye that does not respond to several days of warm compresses, keeps growing, distorts your vision, or comes with fever and significant swelling beyond the eyelid warrants prompt medical attention rather than continued home treatment.
Why Some People Get Styes Over and Over
A single stye is usually just bad luck combined with a temporarily blocked gland. Recurrent styes point to a persistent underlying condition. The most common culprits are chronic blepharitis, meibomian gland dysfunction, untreated Demodex infestation, and ocular rosacea, all of which keep the eyelid margin in a state of low-grade inflammation that makes fresh blockages almost inevitable. Treating each stye as it appears without addressing the underlying condition is like mopping a floor while the faucet is still running.
For people caught in that cycle, the evidence points toward a layered approach. Consistent eyelid hygiene (warm compresses for five to ten minutes daily, gentle scrubbing of the lash line with diluted baby shampoo or commercially available lid wipes) addresses gland blockage. If Demodex is suspected, tea tree oil-based lid scrubs or prescription treatments can reduce the mite population. If rosacea is involved, anti-inflammatory medications for the skin condition tend to calm the eyelid inflammation as well. And for everyone, the basics apply: hands off the eyes, fresh cosmetics, clean contact lenses, and enough sleep to let the immune system do its job.