A stye forms when bacteria, almost always Staphylococcus aureus, infect one of the tiny oil or sweat glands along your eyelid margin. The process is similar to getting a pimple: a gland gets blocked, bacteria that normally live on your skin multiply inside it, and the area swells into a painful, red bump. Understanding the specific ways this happens can help you avoid repeat episodes.
What Happens Inside the Eyelid
Your eyelids contain dozens of small glands that produce oils and moisture to keep your eyes lubricated. Along the lash line, oil glands and sweat glands open near each hair follicle. Deeper inside the eyelid, a row of larger oil glands runs through the firm tissue that gives your lid its shape. When any of these glands becomes clogged, the oil or fluid backs up. Staphylococcus aureus, the most common bacterial pathogen found around the eyes, colonizes the blocked gland and triggers an infection. Your immune system responds with inflammation, producing the telltale tender lump.
There are two types. An external stye, the more common kind, starts in the small glands right at the base of an eyelash. An internal stye develops deeper in the eyelid, inside the larger oil glands embedded in the lid tissue. Internal styes tend to be more painful because they press against the eye, and they sometimes take longer to resolve.
Touching Your Eyes With Dirty Hands
The single most common way bacteria reach your eyelid glands is through your fingers. Every time you rub your eyes, adjust your lashes, or even rest your face in your hands, you transfer bacteria from whatever you last touched onto the thin, delicate skin of your eyelids. If those bacteria reach an oil gland opening, an infection can start. This is why styes often appear during allergy season or periods of stress, when people tend to rub their eyes more frequently.
Makeup and Cosmetic Habits
Eye makeup is one of the most overlooked stye triggers. Mascara and liquid eyeliner sit right along the lash line, exactly where the glands open. These products are generally considered safe to use for about three months. After that, bacteria multiply in the tube or bottle to levels that can cause infections. Adding water to dried-out mascara accelerates bacterial growth rather than solving the problem.
Sharing eye makeup introduces someone else’s skin bacteria to your eyelids. Sleeping in makeup gives those bacteria hours of uninterrupted contact with clogged gland openings. Applicator brushes also accumulate bacteria over time and should be washed every seven to ten days. If you’ve had a stye recently, replacing the mascara or liner you were using at the time helps prevent reinfection.
Contact Lens Hygiene
Contact lenses don’t directly cause styes, but poor lens habits raise your risk. A lens can trap bacteria against the surface of your eye and eyelid, giving them prolonged contact with the glands. Handling lenses with unwashed hands is essentially the same as rubbing your eyes with dirty fingers. Reusing old contact lens solution instead of replacing it fresh each time allows bacteria to survive and multiply in the case.
If you develop a stye while wearing contacts, it’s worth discarding the pair you were wearing, especially monthly or biweekly lenses. Replacing the lens case at the same time removes any bacteria that may have colonized the plastic.
Skin Conditions That Increase Risk
Some people get styes repeatedly, and the reason often traces back to a chronic skin or eyelid condition. Blepharitis, a persistent low-grade inflammation of the eyelid margins, is one of the strongest risk factors. It disrupts the normal flow of oils along the lash line, making blockages more likely. Rosacea, a condition that causes facial redness and flushing, can also affect the eyes. Ocular rosacea leads to blocked oil glands around the eyes and significantly increases stye frequency. Seborrheic dermatitis, which causes oily, flaky skin, produces similar effects on the eyelids.
A condition called meibomian gland dysfunction deserves special attention because it’s both common and underdiagnosed. The oil glands inside the eyelid start producing abnormally thick secretions that clog more easily. If you get styes that keep coming back, this dysfunction is often the underlying cause. It’s linked to several immune-related conditions, including Sjögren’s syndrome, lupus, psoriasis, and rheumatoid arthritis.
Diabetes and Immune Function
People with diabetes get bacterial infections more easily than the general population, and styes are specifically listed among the common ones. High blood sugar triggers the production of molecules that suppress immune defenses, making it harder for your body to fight off the Staphylococcus bacteria that cause styes. Uncontrolled diabetes is the key factor here. People who manage their blood sugar well don’t appear to carry the same elevated risk. If you have diabetes and notice frequent styes, it may be a signal that your blood sugar control needs attention.
Can You Catch a Stye From Someone Else?
A stye is generally not contagious in the way a cold or pink eye is. You won’t catch one by being near someone who has one. However, small amounts of bacteria can transfer from a stye through shared items like towels, pillowcases, or eye makeup. Washing your pillowcases frequently and avoiding sharing anything that touches your face are reasonable precautions, both to protect others and to prevent spreading bacteria to your other eye.
Habits That Lower Your Risk
Most styes are preventable with a few consistent habits. Washing your hands before touching your face or eyes is the most effective single step. Replacing mascara and liquid eyeliner every three months, cleaning makeup brushes regularly, and never sharing eye cosmetics eliminate a major source of bacterial exposure. Removing all eye makeup before bed keeps gland openings clear overnight.
For contact lens wearers, the basics matter: wash your hands before handling lenses, use fresh solution every time, and replace your case regularly. If you have blepharitis or another chronic eyelid condition, daily lid hygiene with warm compresses and gentle cleaning can keep the oil glands flowing freely and dramatically reduce how often styes occur.

