How Do You Get Styes? Causes and Risk Factors

Styes form when bacteria infect one of the tiny oil glands along your eyelid margin. The most common culprit is Staphylococcus aureus, a bacterium that many people carry in their nose without any problems. When that bacterium reaches your eyelid, usually through touching your face, it can clog and infect a gland, creating the red, painful bump you recognize as a stye.

What Happens Inside Your Eyelid

Your eyelids contain two types of oil glands that keep your eyes lubricated. The glands of Zeis sit near the base of your eyelashes, right at the outer edge of the lid. Deeper inside the lid are the Meibomian glands, which produce the oily layer of your tear film. When bacteria enter either type of gland, they trigger an infection that leads to swelling, redness, and a localized bump filled with pus.

An infection of the outer glands (Zeis or Moll glands) is what most people picture when they think of a stye: a visible, tender bump right along the lash line. An infection of the deeper Meibomian glands, called an internal hordeolum, forms a bump that points inward toward your eyeball and can feel more like pressure than a surface pimple. Both types develop the same way, through bacterial infection of a blocked gland.

How Bacteria Reach Your Eye

The most direct route is your own hands. If you carry staph bacteria in your nose (and roughly 30% of people do), rubbing your nose and then touching your eye is enough to transfer bacteria to the eyelid. Any habit that brings your fingers near your eyes increases the chance of introducing bacteria to those small gland openings.

Sharing towels, pillowcases, or washcloths with someone who has a stye can also transfer bacteria, though this is rare. Styes themselves are not considered contagious in the way pink eye is. The risk comes from direct contact with the bacteria, not from being near someone who has one.

Risk Factors That Make Styes More Likely

Some people get styes once and never again. Others deal with them repeatedly. The difference often comes down to underlying eyelid conditions or daily habits that keep bacteria close to the gland openings.

Blepharitis. This is chronic inflammation of the eyelid margins. It creates a crusty, irritated environment along the lash line that makes gland blockages more frequent. People with blepharitis are significantly more prone to styes because their oil glands are already partially obstructed and inflamed.

Ocular rosacea. Rosacea doesn’t just affect facial skin. It can inflame the eyes and eyelids, and healthcare providers sometimes describe it as a form of Meibomian gland dysfunction. Styes are listed among the most common symptoms of ocular rosacea.

Old or shared eye makeup. Mascara and liquid eyeliner should be replaced every six months. Pencil eyeliners last longer, roughly one to two years. Beyond those windows, bacterial growth in the product increases, and every application deposits those bacteria directly onto your lash line. If you develop a stye or pink eye, throw out any eye products you were using during the infection.

Contact lens habits. Contact lenses don’t directly cause styes, but handling them with unwashed hands creates an easy path for bacteria to reach your eyelid glands. Inserting or removing lenses without proper hand hygiene, or rubbing your eyes while wearing contacts, can transfer bacteria from your fingers to the lens surface and then onto your eye.

What a Stye Feels Like as It Develops

Most styes start with tenderness or a gritty, irritated feeling at one spot on the eyelid. Within a day, that spot swells into a visible red bump. The eyelid may feel warm and heavy, and your eye might water more than usual. Over the next few days, the bump typically develops a small white or yellowish head as pus collects.

Styes usually last one to two weeks and resolve on their own. The standard home treatment is a warm compress: soak a clean washcloth in warm water, wring it out, and hold it gently against the affected eye for five minutes several times a day. This softens the blocked gland and encourages it to drain naturally. Resist the urge to squeeze or pop a stye, which can spread the infection deeper into the eyelid tissue.

If pain and swelling haven’t started improving after 48 hours of warm compresses, or if they get worse after the first two to three days, it’s worth having an eye doctor take a look. Most of the time a stye will drain and heal without any medical intervention.

When a Stye Becomes Something More Serious

In rare cases, the infection from a stye can spread beyond the gland into the surrounding eyelid tissue. This is called preseptal (periorbital) cellulitis, and it looks different from a simple stye. Instead of a well-defined bump, the entire eyelid becomes red, swollen, and tender. Your eye movements stay normal and your vision doesn’t change, but the swelling is more diffuse than a typical stye.

A more concerning complication is orbital cellulitis, where the infection moves behind the eyelid into the eye socket. This causes pain with eye movement, possible double vision, and sometimes fever. In children especially, orbital cellulitis can cause a visibly ill appearance. The key distinction is that orbital cellulitis affects how well you can move your eye and how clearly you can see, while preseptal cellulitis and simple styes do not. Any change in vision, difficulty moving your eye, or swelling so severe you can’t open your lid warrants prompt medical attention.

Preventing Styes From Coming Back

Prevention comes down to keeping bacteria away from your eyelid glands and keeping those glands flowing freely. Wash your hands before touching your face or eyes. If you wear contacts, clean them on the schedule your eye doctor recommends and never handle them without washing your hands first. Replace mascara and liquid eyeliner every six months, and never share eye makeup with others.

If you have blepharitis or ocular rosacea, daily eyelid hygiene makes a real difference. Gently cleaning your lash line each morning with a warm washcloth or a diluted baby shampoo solution helps prevent the crusty buildup that blocks oil glands. Warm compresses for a few minutes each day keep the Meibomian glands from thickening and clogging, even when you don’t have an active stye. For people with these underlying conditions, consistent daily eyelid care is often the single most effective way to break the cycle of recurring styes.