A stye is caused by a bacterial infection in one of the small oil-producing glands along your eyelid margin. In 90% to 95% of cases, the bacterium responsible is Staphylococcus aureus, a common germ that already lives on your skin and around your nose. The infection starts when one of these tiny glands gets blocked, trapping oil inside and giving bacteria a warm, enclosed space to multiply.
How the Infection Starts
Your eyelids contain several types of glands that produce oils to keep your eyes lubricated and your tears from evaporating too quickly. When one of these glands becomes clogged, whether from dead skin cells, dried oil, or debris, bacteria that normally live harmlessly on your skin can colonize the blocked gland. The trapped oil becomes a breeding ground, and your immune system responds with inflammation, swelling, and the painful red bump you recognize as a stye.
This process typically unfolds over a few days. You might first notice a tender spot on your eyelid that gradually swells into a visible lump, often with a small white or yellow head where pus has collected.
External vs. Internal Styes
Not all styes form in the same place, because your eyelid has different glands at different depths.
- External styes develop in the smaller oil glands (called glands of Zeiss or Moll) near the base of your eyelashes. These are the more common type, and they tend to form a visible bump right along the lash line. When they drain, pus comes out through the outer surface of the eyelid.
- Internal styes develop deeper inside the eyelid, in larger oil glands embedded in the eyelid’s structural plate. These tend to be more painful and less visible from the outside. When they drain, pus typically releases on the inner surface of the eyelid, against the eye itself.
Both types share the same basic mechanism: a blocked gland followed by bacterial infection. Internal styes can be more stubborn because the glands involved are larger and deeper.
Why Some People Get Styes More Often
Certain conditions make styes more likely to recur by keeping your eyelid glands chronically inflamed or prone to blockage.
Blepharitis is the most common culprit. This is ongoing, low-grade inflammation of the eyelid margins that disrupts normal gland function. If you frequently have red, crusty, or irritated eyelid edges, especially in the morning, you likely have some degree of blepharitis. The chronic irritation makes it easier for glands to clog and bacteria to take hold.
Ocular rosacea is another significant driver. People with rosacea on their face often develop it around their eyes too, where it causes persistent inflammation of the eyelid margin and tear film. Patients with ocular rosacea commonly present with chronic red eyes, recurring blepharitis, and frequent styes as early signs of ongoing inflammation. The condition involves an overactive inflammatory response that disrupts the normal balance of the eyelid’s surface, making infections more likely.
Tiny mites called Demodex, which naturally live in hair follicles and eyelash roots, can also play a role. When their population grows too large, they contribute to eyelid inflammation and can worsen both blepharitis and rosacea. Bacteria living inside these mites may trigger additional immune responses that further compromise the eyelid surface.
Everyday Habits That Raise Your Risk
Beyond underlying conditions, everyday behaviors influence how often glands become blocked. Inadequate cleaning of the eyelid margins promotes bacterial buildup and makes it easier for oil glands to clog. If you wear eye makeup, especially liner applied along the waterline, residue can physically block gland openings. Sleeping in makeup compounds this effect overnight.
Touching or rubbing your eyes with unwashed hands introduces additional bacteria to an area that’s already home to Staphylococcus aureus. Contact lens wearers who don’t follow proper hygiene, such as handling lenses with dirty fingers or reusing old solution, face a higher risk for the same reason. Anything that increases the bacterial load near your eyelid glands while simultaneously irritating them creates the perfect setup for a stye.
How Eyelid Hygiene Helps Prevent Them
Because styes begin with blocked glands, keeping those glands clear is the most effective form of prevention. Clinical studies consistently show that regular eyelid cleaning improves gland function, reduces bacterial overgrowth, and relieves the kind of chronic irritation that leads to recurrent styes.
Warm compresses are the foundation. Holding a warm, damp cloth against your closed eyelids for five to ten minutes softens the oil inside the glands, making it flow more freely and less likely to harden into a blockage. Following this with a gentle scrub along the lash line removes debris, dead skin cells, and bacterial buildup from the gland openings. Research on patients with gland dysfunction found that a combination of eyelid scrubbing and lubrication improved gland function within one month, with patients reporting less discomfort and better eyelid hygiene overall.
For the scrub itself, both diluted baby shampoo and commercial eyelid cleansers have proven effective. Studies comparing the two found similar improvements in symptoms and signs of gland dysfunction with either option. Tea tree oil-based cleansers may offer an additional benefit for people dealing with Demodex mites, as one study found they were more effective at improving gland function than standard cleansers.
When a Stye Becomes Something More Serious
Most styes resolve on their own or with warm compresses. Rarely, the infection can spread beyond the gland into the surrounding tissue, causing a condition called periorbital cellulitis, where the skin around the eye becomes diffusely red, warm, and swollen rather than having a single localized bump.
The more dangerous progression is when infection moves past the thin membrane that separates the eyelid from the eye socket itself. Warning signs of this deeper spread include the eye starting to bulge forward, pain when moving the eye, restricted eye movement, and decreased vision. These symptoms require urgent medical attention because infection within the eye socket can potentially reach the brain through veins that connect directly to structures behind the eyes. This progression is uncommon, but the distinction matters: a stye that stays as a localized bump is manageable at home, while spreading redness with any change in vision or eye movement is not.

