You can do plenty to help prevent the spread of viral and bacterial infections, such as getting a flu shot and staying home from work or school if you get sick.

But one of the most important steps is also one of the simplest: washing your hands regularly.

More on infections

“Many different germs can survive on surfaces,” says Tom Talbot, M.D., chief hospital epidemiologist at Vanderbilt University Medical Center in Nashville, Tenn.

Touching a spot that has been contaminated by germs—at home, at work, or just about anywhere else—puts you at risk of infection if you later touch your mouth, nose, or eyes, all areas that allow microbes to enter your body.

Washing your hands—the right way and at the right time—eliminates the germs before they can gain access and make you sick. Here, advice from the experts:

When to Wash

Always wash your hands after you use the bathroom, before you eat food, and anytime your hands are visibly dirty, says Janet Haas, Ph.D., R.N., director of epidemiology at Lenox Hill Hospital in New York and president-elect of the Association for Professionals in Infection Control and Epidemiology. It’s easy to pick up or transmit germs in all three of these instances.

“People should also consider cleaning their hands after they’ve been on public transportation,” she adds.

Make sure kids wash their hands when they come into the house after playing outside. And the Centers for Disease Control and Prevention also recommends that you wash your hands after touching animals.

And if you’re sick with a respiratory infection, such as the common cold or the flu, you may want to clean your hands more often than usual, Haas says, because if you’re coughing and sneezing, you could be contaminating your hands and spreading the bug to others.

How to Encourage Your Doctor to Wash

While hand hygiene is always important, it’s essential if you’re in the hospital, where severe and sometimes antibiotic-resistant infections can lurk.

“Hospital personnel not only can transmit infections but also can get sick themselves,” says Orly Avitzur, M.D., Consumer Reports’ medical director. “So we all know that we should wash our hands before and after attending to every patient.”

But research shows that doesn’t always happen. According to the CDC and assorted studies, some providers clean their hands as little as half as often as they should.

If you are hospitalized or caring for someone who is, and notice that a healthcare provider hasn’t washed up when entering your room, speak up.

To make this conversation feel less daunting, Avitzur recommends taking note of any signs posted about hand-washing in the hospital and using that as a way to start the conversation.

Avitzur suggests saying—or asking a family member to say—something like, “I was so pleased to see that your hospital has a hand-washing policy. Have you washed your hands?”

In addition, remind visitors to wash their hands when they enter and leave your room. And if you’re the patient, be sure to keep up with your hand hygiene. Ask for help washing your hands before a meal, or request a bottle of alcohol-based hand sanitizer.

The Best Way to Wash

Generally, washing with soap and water is the most effective method for reducing the number of germs on your hands.

Plain soap is best—skip antibacterial products because there’s no evidence they work any better than regular soap, and they may encourage the breeding of bacteria that can’t be cured by antibiotics.

If you have no access to soap and water, using a hand sanitizer made with at least 60 percent alcohol is the next best option. But hand sanitizers won’t eliminate all kinds of germs, according to the CDC.

For example, they’re ineffective against Clostridium difficile (C. diff), a hard-to-cure diarrheal infection that’s common in hospitals. So if you have this infection, you (and your care team and visitors) will need to wash with soap and water.