Getty Images

YouTube said Friday that it's removing ads that appear on video channels featuring anti-vaccination content.

The move comes after some marketers pulled ads from the platform because they didn't know they were appearing with videos that discourage vaccinations. BuzzFeed, which first inquired about the anti-vaccination videos with YouTube, earlier reported the news.

"We have strict policies that govern what videos we allow ads to appear on, and videos that promote anti-vaccination content are a violation of those policies," a YouTube spokeswoman said in a statement. "We enforce these policies vigorously, and if we find a video that violates them, we immediately take action and remove ads."

While YouTube, which is owned by Google, is dropping the ads from those channels, the policy is not new. Anti-vaccination content was already considered harmful content, and should not have been monetized in the first place, but those videos slipped through YouTube's filters.

Lawmakers have recently put pressure on tech giants to stop the spread of misinformation concerning vaccinations. Earlier this month, Rep. Adam Schiff, a Democrat from California, wrote an open letter to Google CEO Sundar Pichai urging him to fix the problem of anti-vax content on the search giant's platforms.

"There is strong evidence to suggest that at least part of the source of this trend is the degree to which medically inaccurate information about vaccines surfaces on the websites many Americans get their information, among them YouTube and Google search," Schiff wrote.

The news also comes after advertisers, including AT&T and Fornite maker Epic Games, said they would boycott YouTube for their ads appearing next to content that promoted child exploitation.