Facebook is making it harder to profit off of smut, vice and fake news.

The social media platform promised Wednesday to keep ads off content and videos that feature graphic images, nudity, violence or adult language.

It also said that users who repeatedly post fake news may not be allowed to make money on the site.

The new rules should help assure companies that their ads will not appear alongside objectionable material. But it also puts Facebook in the position of deciding whether specific pages and videos are offensive.

The move could help Facebook to avoid problems that have plagued its cross-town digital ad rival.

Google came under pressure earlier this year when major brands discovered their ads were shown alongside YouTube videos made by extremists.

AT&T, Verizon, Walmart, Johnson & Johnson and JPMorgan Chase were among the firms that temporarily pulled their ads off the video platform.

The rules published by Facebook on Wednesday prohibit ads from running on content that features “fights, gore and beatings of either animals or people.”

Content deemed to be “incendiary, inflammatory and demeaning” or that depicts “blood, open wounds, bodily fluids, surgeries, medical procedures or gore” will not be monetized.

Related: Inside the fake news machine

The regulations should help undercut the business model of those who publish sensationalist headlines and what Facebook describes as “false news,” though it will not solve the problem entirely, especially because many of those people use Facebook not for ad revenue but to drive traffic to their sites, on which they sell ads.

The company has cracked down on fake news publishers in the wake of the 2016 presidential election, when huge volumes of misleading information was peddled on the site.

In late August, the company said that users who repeatedly share fake news would be prohibited from running their own ads on the site.

Related: Facebook says it sold ads to Russian ‘troll farm’ during 2016 campaign

Google and Facebook own huge chunks of the digital advertising business, and major brands are spending an increasing share of their ad budgets on their platforms.

But as advertisers direct more dollars to digital, many are demanding proof that the ads are translating into sales, and are growing wary of the content to which their ads are connected.

WPP, the world’s largest advertising company, warned last month that the transition from traditional ads to digital is not going smoothly.

“The digital marketplace has been dogged by issues such as measurability, viewability, fraud, and fake news,” the company said in its earnings report.