There are a handful of times when you’d expect to see bloodshot eyes staring back at you in the mirror: after a rough, sleepless night, a goggle-free dip in the pool, or a visit to a coffee shop in Amsterdam, for starters.

But sometimes your eye—or eyes—isn’t just red. Sometimes it morphs into an itching, swollen, pus-producing mess, too. And if that’s the case, you might have what doctors call conjunctivitis, or what you probably know as pinkeye. Here’s everything you need to know when you wake up blinking red.

Related: 10 Reasons Your Eyes Are All Bloodshot

What Is Pinkeye?

Conjunctivitis, or pink eye, is the irritation of your eyes’ conjunctiva—the thin membrane that covers the white part of your eye. Nearly six million Americans get it each year, the American Academy of Ophthalmology estimates.

There are three kinds of conjunctivitis: viral (the most common), bacterial and allergic.

Viral cases are usually caused by the adenovirus, says Stephen Orlin, M.D., associate professor of Ophthalmology and the Presbyterian Medical Center of Philadelphia. That’s the same class of virus that gives you the common cold.

As for bacterial causes, staph and strep are usually the bugs at fault. There’s also a subgroup of bacterial conjunctivitis caused by sexually transmitted infections, like gonorrhea and chlamydia. It can affect your eyes if you already have it down below.

preview for Places You Should Never Stick Your Penis

“This occurs from using the same towel above the belt as below the belt for your nether regions as your face,” says Stephanie J. Marioneaux, M.D., clinical spokesperson for the American Academy of Ophthalmology.

Related: 4 STDs You Might Already Have

Allergies like pollen or pet dander can be a culprit, too.

You usually pick up the infectious kind—whether viral or bacterial— by rubbing your eyes after touching an infected surface or having close contact with someone who is already infected. (Allergic pink eye is not contagious.)

“Viruses can live on a surface, like a door knob or grocery cart, for 30 days,” says Dr. Marioneaux, M.D

What Are the Signs Of Pink Eye?

“Patients with pink eye should have itching as their most prominent symptom,” says Esen K. Akpek, M.D., Bendann family professor of ophthalmology at the Johns Hopkins University School of Medicine.

Other symptoms include feeling like something is in your eye, burning, puffy eyelids, sensitivity to light, and discharge, which can range from watery to pus-like.

Related: This Disgusting Pus Popping Video Will Make You Gag

But the driver of your pinkeye can also play a role in what symptoms you experience. For instance, if your pinkeye has a viral cause, you’ll probably notice it start in one eye and then spread to the other within days.

“Viral conjunctivitis patients usually have clear tearing and discharge,” says Dr. Akpek. Typically eyes are very red, but are not painful.

Bacterial conjunctivitis, on the other hand, is more likely to stay in just one eye.

“Patients with bacterial conjunctivitis have discharge that is yellow or greenish (that makes) the lids and lashes stick together,” says Dr. Akpek.

With allergic pink eye, you’ll notice it come on seasonally, particularly in spring and summer when your allergies flare up. It usually occurs in both eyes, itches a lot, and comes with tearing and swelling. (For more health news delivered right to your inbox, sign up for our Daily Dose newsletter.)

What to Do If You Think You Have Pink Eye

If your eye is still oozing after 24 to 48 hours, you should try to get in to your eye doctor to be evaluated, says Dr. Marineaux. “If you have any pain or change in vision, visit the doctor immediately.”

And see an ophthalmologist. Ophthalmologists are medical doctors with at least eight years of additional medical training in eye health, which allows them to better diagnose your conjunctivitis as viral, bacterial or allergic.

That’s important, since if it’s not ID’ed correctly, you could be getting treatment that you don’t need—and doesn’t work. In fact, a recent study from the American Academy of Ophthalmology found that 60 percent of people with acute conjunctivitis are inappropriately prescribed antibiotic eye drops. That means they won’t help treat your condition.

Related: The 8 Worst Things You Are Doing To Your Eyes

“Most health care providers do treat patients with pink eye with antibiotic drops, as patients expect to be given something by their health care provider. In reality these are completely unnecessary and ineffective,” says Dr. Orlin. What’s more, taking antibiotics you don’t need can raise your risk of antibiotic resistance down the line.

Going to a family medicine physician or urgent care provider—instead of an ophthalmologist—increases your chances of getting unnecessary treatment. The same study found that those who did not receive treatment from an ophthalmologist were two to three times more likely to receive antibiotics.

If the doctor determines your cause is viral, you’ll likely be sent home with supportive care—think cool compresses and artificial tears—rather than eye drops, says Dr. Orlin. It should clear up within 7 to 14 days. If your pinkeye is allergic, it can be treated with an antihistamine eye drop.

How to Prevent Pink Eye

To protect yourself from getting pink eye, you’ll need to follow basic hygiene rules.

“Hand washing is the most important thing,” says Dr. Akpek. Avoid touching your face and rubbing your eyes, which can spread conjunctivitis to an uninfected eye.

If you already have a conjunctivitis diagnosis, it’s time to do a cleaning overhaul of your home. Wash any towels, washcloths, sheets, and pillowcases you’ve recently used in hot water. And stick with disposable products, like tissues or paper towels, says Dr. Akpek, until about 7 to 14 days, when your symptoms should start clearing up. Avoid wearing contacts until the infection is completely gone, and throw out contacts you wore before your infection.

While quarantining yourself during pink eye is near impossible, be a courteous co-worker and display extra vigilance to prevent infecting others—which may mean staying home. If your pink eye has been diagnosed as bacterial, you can go back to work 24 hours after beginning antibiotics.