A sign advising clients in various languages, including Chinese, that respiratory masks are sold out, is displayed on January 29, 2020 at a pharmacy in downtown Rome, in the wake of the 2019-nCoV coronavirus, a virus similar to the SARS pathogen, spreading around the world since emerging in a market in the central Chinese city of Wuhan.

As coronavirus cases continue to spread around the globe, online ads for hand sanitizers, gloves, masks and other products purporting to prevent sickness were rampant, and companies are having a hard time enforcing policies that ban such ads.

As of Wednesday afternoon, Google was showing many such ads, even though it has a policy that prohibits ad content that capitalizes off the coronavirus, according to a spokesperson. Products promising to prevent coronavirus are appearing in sponsored shopping lists for product searches and in Google display ads that show up on third-party sites.

Google issued a statement late on Wednesday, which said: "These Shopping results violated our ad policies and we removed them immediately. Since January, we've blocked tens of thousands of ads that attempted to capitalize on the coronavirus situation and we continue to take action to prevent these ads from serving." But CNBC still found sponsored listings Thursday morning for products claiming to prevent coronavirus.

Facebook last week prohibited ads claiming to prevent or cure coronavirus or trying to create a sense of urgency around the epidemic, like promoting the "limited supply" of a product.

Google and other major tech companies such as Amazon have seen third parties move quickly to use their platforms in attempts to make money from coronavirus concerns and have struggled to stay ahead of the violators. It's the latest example of how the operators of massive-scale online platforms sometimes lack the tools or personnel to keep up the never-ending game of whack-a-mole against people who exploit them.

For instance, CNBC viewed ads for masks served by Google that promised "Protection Against Coronavirus" and said they were "Government approved to block up to 95% of airborne viruses and bacteria. Limited Stock." The photo shows a 3M mask, whose direct website listing says the product is "[National Institute for Occupational Safety and Health] approved for at least 95 percent filtration efficiency against certain non-oil based particles." But the actual listing is for a site called "MedicalProtex."

Other ads for masks claim they also had a "Limited stock." Meanwhile, Google's shopping results display hand sanitizers, protective clothing, masks and other products claiming to protect against coronavirus.

Google says its Shopping rankings are "based on a combination of advertiser bids and relevance, such as your current search terms and your activity."

A Google spokeswoman pointed to the company's "sensitive events policy" for ads. Under the policy, the company said it prohibits content that "may capitalize on events such as a natural disaster, conflict or death." The company said the coronavirus outbreak "falls in scope with this policy and we are actively enforcing it across our platforms." The spokeswoman also said the policy applies to YouTube and that the company is not allowing creators to monetize videos that deal with sensitive events such as the coronavirus outbreak.

The spokeswoman said Google also has a "sensitive events" policy for Shopping that it has "been proactively enforcing" and removing listings or items that violate its policies. The company said it was investigating examples of listings provided by CNBC and will be taking them down on Wednesday afternoon.

Google's advertising policies on "Healthcare and medicines" say it prohibits "Non-government approved products that are marketed in a way that implies that they're safe or effective for use in preventing, curing or treating a particular disease or ailment."

MedicalProtex, Ready Made Prime, Demand Gadget and OurTechnologyHome, the companies listed as being behind some of the ads, didn't immediately return requests for comment Wednesday.

Facebook last week prohibited ads claiming to prevent or cure coronavirus or trying to create a sense of urgency around the epidemic, such as promoting the "limited supply" of a product.