Facebook Inc. and YouTube are being flooded with scientifically dubious and potentially harmful information about alternative cancer treatments, which sometimes gets viewed millions of times, a Wall Street Journal examination found.

Now, the companies say they are taking steps to curb such accounts. Facebook last month changed its News Feed algorithms to reduce promotion of posts promising miracle cures or flogging health services, a move that will reduce the number of times they pop up in user feeds, the company says. Some of the affected posts involve a supplement salesman who promotes baking-soda injections as part of cancer treatment.

“Misleading health content is particularly bad for our community,” Facebook said in a blog post announcing the moves.

Alphabet Inc.’s YouTube has been cutting off advertising for bogus cancer-treatment channels, a spokesman said. It is working with medical doctors to identify content promoting unproven claims and medical conspiracy theories and has tweaked its algorithms to reduce the number of times these dubious videos are presented to users.

Facebook and YouTube detailed their recent actions on cancer-related content after the Journal presented them with its findings. Widespread misinformation sometimes appeared alongside ads, videos or pages for proven treatments, the Journal found.