Swimming can be a great way to cool off during the summer. And it’s a healthy, low-impact aerobic exercise.

Yet beyond the ever-present danger of drowning, swimming can carry risks, including the potential for sunburn, illness, and—very rarely—infection by a brain-eating amoeba.

Before you or your kids swim this summer, protect yourself from these hazards by following these tips:

Sunburn

Avoiding sunburn is key to staying safe in the summer. The sun can damage your skin in as little as 15 minutes, according to the Centers for Disease Control and Prevention. UVB rays cause sunburn; UVA rays tan and age your skin. Both contribute to skin cancer, the most common form of cancer in the U.S.

How to prevent it:

  • Apply sunscreen early and often. Put sunscreen on at least 15 minutes before you go outside. Shake it before you use it, and reapply regularly—at least every 2 hours, and anytime after you’ve been swimming or sweating.
  • Seek shade. Try to stay in the shade during the sunniest part of the day if you can, from 10 a.m. to 4 p.m.
  • Cover up. Sunscreen is just one part of a sun-protection strategy, says Nichole Steffens, aquatic product manager for the American Red Cross. Wear a hat and periodically put on clothing that covers your skin.

Swimmer's Ear

This ear infection is distinct from a typical middle-ear infection. It’s an outer-ear infection that’s triggered when contaminated water gets trapped in the ear canal. Swimming “produces this great environment for bacteria to have a heyday,” says Candice Dye, M.D., an assistant professor in the department of pediatrics at the University of Alabama at Birmingham.

Symptoms include itchiness inside the ear, redness or swelling, pain if the ear is tugged or pressed on, and pus that drains from the ear. (If you or your child get it, visit your doctor, who may prescribe antibiotic ear drops.)

How to prevent it:

  • Protect your ears. Keep ears dry if you can, using a swim cap or silicone ear plugs (not wax).
  • Remove water after a swim. Dry your ears with a towel after swimming. If you have water in an ear, tilt your head downward and pull your ear in different directions to coax water out.
  • Try ear drops. Over-the-counter ear drops meant to dry out your ears can also help, Dye says, if you haven’t been able to get the water out of your ears. Ask your doctor to recommend a brand.

Stomach Bugs

If you or your child come down with a case of diarrhea after visiting a swimming pool, the culprit could be a parasite called cryptosporidiosis, or crypto for short. Crypto is a common cause of swimming-related illness, and outbreaks are on the rise. According to a CDC study this month, crypto outbreaks related to water recreation doubled between 2014 and 2016.

You can’t always tell by sight how clean the water is in public pools, and crypto isn’t easily killed by chlorine. It can live for days even in pools that are properly maintained. (Other bugs, such as norovirus and giardia, can also survive in chlorinated pools, though not for nearly as long as crypto.)

How to prevent it:

  • Don’t swallow water. And remind children not to swallow water.
  • Keep sick kids out of the water. Don’t swim or allow kids to swim when sick with diarrhea (even with swim diapers, which are not foolproof).
  • Wash up. Shower with soap and water before and after you swim.

A Rarer Danger: Naegleria Amoeba

Each year it’s common to see one or two headlines about people who contract the brain-eating amoeba naegleria fowleri, which can grow in warm freshwater bodies such as lakes, ponds, hot springs, and poorly maintained swimming pools. The amoeba can cause a disease of the central nervous system called primary amebic meningoencephalitis, which is nearly always fatal.

The good news is that naegleria infections are rare. Between 2006 and 2015 there were only 37 reported cases in the U.S., according to the CDC. And the amoeba won’t harm you if you swallow contaminated water; it’s dangerous only if you get it up your nose.

Naegleria infections are so uncommon that scientists haven’t been able to make definitive research-based recommendations about how to avoid it. Still, the CDC offers some common-sense tips for reducing the likelihood that you’ll expose yourself to naegleria.

How to prevent it:

  • Keep your head up. Avoid putting your head underwater in bodies of warm freshwater, such as a lake or hot spring.
  • Plug your nose. If you do jump in or swim underwater, pinch your nose or use a nose clip.
  • Stay out of the mud. Try not to stir or dig up sediment in warm freshwater areas.