As the latest coronavirus outbreak continues to wreak havoc around the world, Google is doing its part to stop the spread of mask ads on the Internet.

In an e-mailed statement to CNBC on Tuesday, Google said that it will temporarily ban ads related to medical masks across its advertising network. The company didn't say how long the ban would last, but said that it would continue to evaluate the issue as Covid-19's spread continues.

"Out of an abundance of caution, we have decided to temporarily ban all medical face mask ads," a Google spokeswoman told CNBC in an e-mailed statement. "We're actively monitoring the situation and will continue to take action as needed to protect users."

The move comes as people around the globe try to protect themselves against Covid-19. However, those efforts, which have seen stores run out of a variety of health-related supplies including disinfectants and hand sanitizer, has also created an opportunity for companies trying to capitalize on Covid-19 to pounce.

Indeed, the number of companies advertising medical masks has increased, and those who are trying to sell other products related to the Covid-19 outbreak are also using Google ads and other platforms to promote their products.

The problem with medical masks, however, is that most will not work to protect people against Covid-19. And although medical masks could be used by those with the illness to prevent its spread, agencies are asking healthy people not to buy masks that would work to protect them, so those in higher risk groups, including the elderly and people with underlying conditions, can access them.

Google's move is likely an attempt by the company to stop the profiteering that has already occurred around Covid-19, but it could also be difficult for the company to police in the short-term. Indeed, Google told CNBC that it's likely some face mask ads will continue to be displayed in the coming days as the company works to remove them from its ad network.

That said, Google is a little late to the game: Facebook announced that it was temporarily banning face mask ads on Friday.

Whatever the case, companies hoping to advertise their products in response to Covid-19 will need to be careful. For one, they shouldn't be trying to capitalize on the global outbreak for their own profit. But if they do have products that might help people, they'll need to promote them in ways that highlight the value and downplay the panic.

Like anything else, companies should be thinking about how they can contribute positively during these times. And if they think can help, they should try--without trying to capitalize at the same time.