Styes form when bacteria infect an oil gland or hair follicle along the edge of your eyelid. The process is straightforward: oil builds up in a gland, the gland gets clogged, and bacteria (almost always Staphylococcus aureus, the same staph that causes skin infections) multiply inside the blockage. The result is a small, painful abscess that looks like a red, swollen bump.
Understanding what triggers that chain of events can help you avoid styes in the first place, or at least reduce how often they come back.
What Happens Inside Your Eyelid
Your eyelids contain dozens of tiny oil glands. Some sit right at the base of your eyelashes, while larger ones are embedded deeper in the eyelid tissue. These glands produce an oily layer that coats your tears and keeps them from evaporating too quickly. When one of these glands slows down or its opening gets plugged, the oil thickens and stagnates. That stagnant oil becomes a breeding ground for staph bacteria, which are already present on your skin in small numbers. Your immune system responds by flooding the area with white blood cells, creating a pocket of pus and dead tissue.
External styes appear right along the lash line, where the smaller glands sit. They’re the most common type and often look like a pimple next to an eyelash. Internal styes form deeper inside the eyelid, in the larger oil glands. These tend to be more painful and can sometimes only be seen by flipping the eyelid, though you’ll feel the pressure and tenderness clearly.
The Most Common Causes
Most styes trace back to everyday habits rather than a single dramatic event. Touching your eyes with unwashed hands is the most direct route for transferring staph bacteria to your eyelid glands. But several other factors increase your risk significantly.
Old or shared makeup. Mascara and liquid eyeliner are safe for about three months after opening. Pencil eyeliners last closer to a year. Beyond those windows, bacteria multiply inside the product and on applicator brushes. Every time you swipe contaminated mascara across your lashes, you’re depositing bacteria directly at the gland openings. Adding water to dried-out mascara makes the problem worse by creating an even more hospitable environment for bacterial growth.
Contact lens habits. Sleeping in lenses, rinsing them with tap water, swimming with them in, or “topping off” your lens case with fresh solution instead of emptying and cleaning it first all increase the risk of eye infections. The moist surface of a lens and its storage case are ideal environments for microorganisms. Even household tap water, though safe to drink, contains bacteria that can colonize lenses and transfer to your eyelids.
Not removing makeup before bed. Leaving eye makeup on overnight gives bacteria hours of uninterrupted contact with your gland openings while debris gradually blocks them.
Rubbing your eyes frequently. This transfers bacteria from your hands and also physically irritates the gland openings, making blockages more likely.
Chronic Conditions That Make Styes Recurrent
If you get styes repeatedly, a one-off hygiene fix may not be enough. Several underlying conditions cause the oil glands in your eyelids to malfunction chronically, creating the thickened, stagnant secretions that invite infection over and over.
Blepharitis, a persistent low-grade inflammation of the eyelid margins, is the most common culprit. It causes crusty, flaky buildup along the lash line and keeps glands perpetually irritated. Ocular rosacea is another frequent contributor. It’s closely tied to meibomian gland dysfunction, where the large oil glands in the eyelid don’t secrete properly. People with rosacea affecting their facial skin often develop styes and chalazia without realizing the two conditions are connected. Seborrheic dermatitis, the same condition that causes dandruff on the scalp, can also affect the eyelids and set the stage for repeated blockages.
How a Stye Feels
A stye is painful. That’s the defining feature. It starts as a tender spot on the eyelid that quickly develops into a red, swollen bump, usually at the base of an eyelash. You might notice a small white or yellow pus spot at the center. The swelling can sometimes spread across the entire eyelid, making it look puffy and half-closed. Other common symptoms include a gritty or scratchy sensation (like something is stuck in your eye), sensitivity to light, tearing, and crustiness along the eyelid margin.
A chalazion, by contrast, is usually painless. It forms farther back on the eyelid, grows more slowly, and rarely causes the whole lid to swell. If you have a painless, firm bump that’s been sitting on your eyelid for weeks, that’s more likely a chalazion than a stye. Chalazia develop from blocked glands too, but without the acute bacterial infection.
Treating a Stye at Home
Warm compresses are the primary treatment. The heat liquefies the hardened oil inside the blocked gland, helping it drain naturally. Research shows it takes at least two to three minutes of sustained warmth on the eyelid surface to soften the oil effectively. Most ophthalmologists recommend applying heat for about five minutes at a time, two to four times per day. Use a clean washcloth soaked in warm water, or a microwavable eye mask designed for this purpose.
Don’t apply heat continuously for long stretches. Extended warmth dilates local blood vessels and can actually increase swelling. Five-minute sessions with breaks in between work better.
While the stye is healing, gently wash the affected eyelid with mild soap and water. Skip eye makeup entirely until it’s resolved, and if you wear contact lenses, switch to glasses until the stye clears. Contacts can harbor the same bacteria causing the infection and slow your recovery.
Most styes drain on their own within a week or two. Resist the urge to squeeze or pop it. Forcing the pus out can spread the infection deeper into the eyelid tissue.
Signs of a Serious Problem
Rarely, a stye infection can spread beyond the gland and into the surrounding tissue of the eyelid and eye socket. This condition, called preseptal cellulitis, causes redness and swelling that extends well beyond the original bump and across the entire eyelid area. If you develop a fever along with worsening pain and swelling around the eye, that’s a signal to get care quickly. Vision changes, the eye bulging forward, or pain when moving the eye are more urgent warning signs that suggest the infection may be spreading into deeper structures behind the eye.
Keeping Styes From Coming Back
Daily eyelid hygiene is the single most effective prevention strategy. Washing your eyelids gently each day, especially if you have blepharitis or rosacea, keeps the gland openings clear and reduces the bacterial load on your lash line. Replace mascara every three months, don’t share eye makeup, and always remove makeup before sleeping.
For contact lens wearers, the basics matter more than most people realize: wash your hands before handling lenses, rub and rinse them with fresh solution every time (never just top off old solution), replace the storage case regularly, and never sleep in lenses unless absolutely necessary. Keep lenses away from all water sources, including the shower and pool.
If you get styes more than a couple of times a year despite good hygiene, it’s worth looking into whether blepharitis or rosacea might be driving the cycle. Treating the underlying gland dysfunction makes the styes far less likely to return.

