People should be wearing cloth face coverings to prevent the spread of COVID-19, the Centers for Disease Control said Friday. These homemade masks should cover the nose and mouth and be worn whenever you're in a community setting, like going to the supermarket or pharmacy. The CDC has a helpful guide for DIY-ing a mask with materials you'd have at home. While surgical masks and N95 respirators should be saved for healthcare workers, the idea is that a simple cloth covering could prevent asymptomatic people from spreading the disease in situations where it's hard to maintain social distance. "These are not intended to prevent you from getting the virus, they are intended to prevent other people from getting the virus from you, Dr. Howard Forman, professor of management, public health, economics and radiology at Yale University and Yale School of Medicine, tells CNBC Make It. "If everybody takes that recommendation carefully, then you are clearly benefiting from the collective." But securing a mask is just one piece of the puzzle: For masks to be effective, they must be worn properly. Here's the right way to use a cloth face covering during the COVID-19 pandemic, plus common pitfalls that could affect your safety:

Focus on the fit

Face coverings should be snug, but still comfortable, and cover your whole nose and mouth, and extend underneath your chin, according to the CDC. You should be able to breathe normally, but the sides of the mask should fit close to your face. In truth, wearing a mask can be a little bit annoying, Forman says. Glasses-wearers may struggle with masks steaming up lenses, and it can make breathing somewhat uncomfortable or stuffy. (Kids under age 2 and people who have trouble breathing shouldn't wear cloth face coverings, per the CDC.) If you're feeling restricted or uncomfortable wearing a scarf over your face, you may want to consider making a mask. Here's how the CDC suggests making a quick face covering using a scarf, bandana or towel and two rubber bands or hair elastics.

But you should "find a way to make it is as comfortable as possible," Forman says. "If you choose not to wear it because it's uncomfortable, you're doing more harm," he says.

Put it on carefully

Whether you're using a homemade mask, scarf, bandana or surgical mask, "one of the most important steps before putting on or after taking off a face covering is to use appropriate hand hygiene, either by using hand sanitizer or washing your hands with soap and water," Walley says. The World Health Organization suggests that people first clean their hands before putting a mask on and check that there are no holes or tears in the fabric. When putting on your face covering, use the ties to place it on your face and cover your face and mouth snugly, making sure you can breathe easily, Walley adds. If your mask has a nose bridge, hold it in place, then loop the ear bands over your ears. A bandana, scarf or cloth covering should be applied with the same care. And don't touch the outside of the mask or cloth which could be contaminated.

Don't touch the mask while wearing it

You shouldn't be taking off, adjusting or moving your mask during your outing, says Forman. "It is important to remember the outside of the mask is considered contaminated," Dr. Susan Walley, professor at the University of Alabama School of Medicine, practicing at Children's of Alabama, tells CNBC Make It. A recent laboratory study found that the virus that causes COVID-19 could survive on a face mask for up to seven days. That means, if you must take off your mask for a quick breather, or an itch, it's important to practice good hand hygiene after touching the face covering.

Take it off carefully too

There's some technique involved taking off a mask, especially if you're a healthcare worker or taking care of someone who has COVID-19. The key is to avoid accidentally contaminating your hands or touching your face. Be extra careful not to touch the front of your mask and your eyes, nose and mouth when removing your face covering, and wash your hands after handling your mask, according to the CDC. Remember: Wearing a mask or cloth face covering doesn't make you invincible. "There's no question you could be getting viral particles on the outside of it," Forman says. The CDC recommends storing personal protective equipment in a paper bag, so you should do the same with your cloth face covering, Walley says.

Wash your mask often

Currently, there are no strict guidelines about washing and sanitizing cloth face coverings and masks. According to the CDC, machine-washing your mask is enough to disinfect your cloth face covering. You should wash it regularly, or after each time you wear it. It's okay to re-wear a cloth face covering so long as it's not soiled, Dr. William Schaffner, medical director of the National Foundation for Infectious Diseases in Bethesda, Maryland, told NBC's "TODAY" on Monday. Similarly, if you don't have immediate access to laundry, it's reasonable to wait until the face covering is visibly soiled to wash it, Walley says. Any clothing or accessories that you wear have the potential to be contaminated, but right now experts don't believe that the mechanism of transmission is so extreme that you need to be washing or changing your clothes multiple times a day, he says. The same is true for cloth masks and face coverings. "If someone wanted to be aggressive and keep their clothes is as clean as they could be, I think they would want to do the same thing with a mask," Forman says. For example, Dr. Daniel Griffin, an infectious diseases expert at Columbia University, told NPR you should wash your mask as often as you do your underwear. (To that end, you may want to have multiple masks so you can still stay protected while it's in the wash.)

Keep social distancing