As the coronavirus pandemic continues to spread across the country, many Americans are under orders to stay home.

Forty-two states have issued stay-at-home or shelter-in-place orders which as the name suggests mandate their residents stay home to combat the pandemic. The directives differ by location, but generally, they require people to avoid all nonessential outings and stay inside as much as possible.

"Essential" tasks include buying groceries, walking the dog, picking up medicine, visiting a doctor and going for a walk, run, hike or other outdoor activity, as long as proper social distancing is observed.

But with many state and national parks being closed and new guidance from the Centers for Disease Control and Prevention urging people to wear masks in public, some may wonder if it's safe to go outside at all.

Here's a guide on how to safely get some fresh air amid the coronavirus pandemic:

Can I go for a walk under shelter-in-place or stay-at-home orders?

Yes, medical experts say, under certain circumstances. If you have symptoms including coughing, fever or shortness of breath, you should avoid going out for any reason.

But people should get out and exercise, as long as they socially distance while they're outside said Asaf Bitton, a primary care physician and executive director of Ariadne Labs, a joint center for health systems innovation at Brigham & Women’s Hospital and the Harvard T.H. Chan School of Public Health in Boston. That means staying at least 6 feet away from people who aren't in your immediate household.

People venturing outside should also wear masks in public places to help blunt the spread of the virus, Bitton added citing the CDC recommendation.

This protects others if you have coronavirus but aren't showing symptoms, and "is a signal to others that they should be wearing those masks," Bitton said.

How can I safely go for a walk?

Try to avoid popular trails and peak times when others are likely to be out, said Carolyn Cannuscio, an associate professor of family medicine and community health at the hospital of the University of Pennsylvania.

"Many of my public health colleagues, we turn the corner if we see people coming, we cross the street," said Cannuscio. "We know we may appear rude, but we decide that it's worth it."

Bitton said a good way to gauge if someone passing by is too close is to imagine you both holding out your arms. If you could touch each other, you're "certainly too close."

If you're walking with a group, it's important to make it as easy as possible for others to keep their distance, said etiquette expert Lizzie Post, co-president of the Emily Post Institute.

"When you’re walking in a group, it's really polite to drop back into a single file as you pass people," Post said.

She encouraged people to be the ones to suggest friends or family adhere to social distancing rules. Post said she doesn't recommend approaching others who are breaking those rules, but if someone is interfering with your ability to stay safe, it's best to communicate.

How to protect from coronavirus by making a face mask from a t-shirt If you can't purchase a mask, here's how to make one from a t-shirt. ProblemSolved, USA TODAY

"That's when you’re going to have to say 'pardon me I’m trying to social distance, do you mind giving me enough space to pass through?'" Post said.

Also, Cannuscio recommends bringing hand sanitizer in case you have to touch something while you're outside.

Family walk Veronica Bravo

Do I need a mask if I'm running or biking?

Some of the guidance around masks has said it's not necessary to wear one while you're exercising alone, but in most areas it's likely you'll cross paths with someone while you're out.

Cannuscio also noted that wearing a mask can help those who have a habit of spitting remember not to do so.

"I'm unnerved every time I see a runner or a biker spit," Cannuscio said. "People do unpredictable things when they believe that they're on their own."

She said because bikers and runners move so much faster than those just taking a stroll, it's important to stay alert and scan your environment so that you can quickly change course if need be.

She said runners who do floor exercises should wait until they get home and avoid high touch surfaces like publicly available workout equipment or benches. Cannuscio also warned against exercising in groups, suggesting people choose a solitary activity like biking.

Bikers, as always, should ride in the street instead of on the sidewalk to avoid pedestrians and help maintain 6 feet of distance. Cannuscio added that it's best to avoid touching potentially contaminated surfaces like bike racks, if possible.

Can we go to the park?

Most national and state parks are closed and places, like New York City, have also shuttered all playgrounds and basketball courts in an effort to curb the spread of coronavirus. Bitton said playground structures should be avoided, citing recent research that found coronavirus can stay in the air for up to three hours and on plastic and stainless steel for up to two to three days.

"A kid could use it, sneeze, and ten minutes later another kid could grab the same swing or monkey bar and that sets up the possibility of transmission," Bitton said.

He added that it's important for kids to get outdoor exercise, but instead of playing on structures, he recommended taking kids to open-air spaces and playing only with items and people from your household.

He noted that not everyone has access to such open spaces and said a simple walk around the neighborhood with appropriate social distancing measures could be a good alternative.

"Even ten minutes of walking is really good for physical and mental health," he said. "That is hard especially with young children, but the alternative of just sort of staying at home and just being in one space is even worse."