In 2008, Vaccinate Your Family, the nation’s largest nonprofit dedicated to advocating for vaccinations, had to stop posting videos to YouTube.

Then known as Every Child By Two, the organization had used its channel on the massive video platform to post interviews with doctors, public service announcements and testimonials from parents of children who had died of vaccine-preventable diseases.

But those messages were quickly sabotaged. YouTube’s recommendation system, which appears alongside videos and suggests what users should watch next, would direct viewers to anti-vaccination videos, according to Amy Pisani, executive director of Vaccinate Your Family.

“When we would put things on YouTube, it was followed by an anti-vaccination video,” Pisani told NBC News. YouTube’s recommendation system, powered by an algorithm that the company does not make public, has been criticized in recent years for favoring controversial and conspiratorial content. The company has said that it changed the system to point to more “authoritative” sources.

“They were insane. Videos like ‘My child was harmed by the DTaP’ or ‘My child can’t walk anymore,’ every conspiracy that you can imagine would come after ours,” Pisani said. "They actually started running right after our video was over, so if you blinked for a minute, you wouldn’t know it was a new video.”

“We became so frustrated with the recommendations that we moved them to Vimeo,” a far smaller YouTube-like video platform owned by media conglomerate InterActiveCorp, Pisani said. YouTube has more than 10 times Vimeo’s active users and is the second-largest search engine in the world after Google, which also owns YouTube.

Pisani’s story offers a window into the struggle that public health officials and advocates face as they attempt to provide information on vaccinations on social media, where anti-vaccination proponents have spent more than a decade building audiences and developing strategies that ensure they appear high in search results and automated recommendations.

The anti-vaccination community holds to an unscientific conspiracy theory that childhood vaccinations are toxic and cause numerous illnesses and injuries, including autism, and spreads these beliefs through YouTube, Facebook and other online platforms. The widespread prevalence of this misinformation on the platforms has caused some parents to withhold or delay vaccinations, leading to an increase in the spread of preventable diseases, most recently a measles outbreak in the Pacific Northwest that, as of Sunday, had infected 70 people — mostly unvaccinated children.

The World Health Organization included vaccine hesitancy in its list of top 10 threats to global health this year. Though limited, recent research suggests part of the solution to the public health crisis might be found on the same platforms that allowed vaccine myths to spread. A 2017 study published in the journal Pediatrics found that a random sampling of pregnant women who interacted with responsible vaccine information on social media were more likely to vaccinate their babies on time.

“The public understanding of science has shifted dramatically by people moving from Google search into social media to get information about vaccines or any health information,” said Joan Donovan, director of the Technology and Social Change Research Project at Harvard University’s Shorenstein Center. “And this is to their detriment.”

While a valuable resource for asking questions and having discussions, social media has also opened up traps for the everyday user who may not have been susceptible to anti-vaccination theories before visiting a social media group, Donovan said.

“The opportunity has turned into a threat,” Donovan said. “Anti-vaxxers look for ‘momversation’ groups. Because they know that new parents are usually novices who haven’t thought a lot about vaccines and are very susceptible to scientific jargon because they don’t have the information literacy to sort through the rest of the internet.”

Donovan said the source of the unvetted, unscientific information surrounding vaccines isn’t just coming from oversharing parents, but often from highly motivated “snake oil salesmen,” peddling books, merchandise, and “natural cures” to vaccinate preventable illnesses.

“You have your hard-liner true believers pushing anti-vaccine information out of a real anti-scientific belief system, but then you have a whole group of other people who are monetizing it and are selling products with a marketing scheme to ‘take down big pharma,’” Donovan said.

After more than a decade and facing mounting pressure, YouTube announced a change in its recommendation algorithm this month, saying it would stop suggesting conspiracy videos like the ones that followed Vaccinate Your Family’s. YouTube also stopped some anti-vaccine videos from showing ads and earning money, and started providing more information about the threat of vaccine hesitancy in a window below anti-vaccine videos.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

In a statement to NBC News, a YouTube spokesman called misinformation around medical topics “a difficult challenge,” and referred to their recent policy changes, adding, “like many algorithmic changes, these efforts will be gradual and will get more and more accurate over time.”

Pinterest has suppressed all search results on vaccines while the site figures out a solution. And Facebook — which recommends anti-vaccination groups, and allows anti-vaccination groups to target pregnant woman and mothers in paid advertising — has said it “is working” on unspecified changes in regards to health-related misinformation.

It’s all welcome progress, Pisani says, but she believes the damage has been done.

“We used to do so many helpful, wonderful things,” like helping parents who couldn’t afford vaccines and educating doctors on barriers to access, she said. “Now we spend most of our time dealing with the misinformation out there. It’s a constant battle.”

And on social media, the anti-vaccination proponents seem to be winning.

Vaccinate Your Family’s Facebook page has nearly 200,000 likes and followers, but nowhere near the visibility or engagement of anti-vaccine pages and private groups, where hundreds of thousands of users post articles from fringe health websites, trade tips on avoiding state-mandated vaccinations, and share memes bashing parents who vaccinate.

“Anti-vaccination groups are much more successful at using the interactive features of social media than places where we might typically get health advice,” said Naomi Smith, a lecturer at Federation University Australia who has studied the anti-vaccination movement on Facebook. “So pro-vaccination pages either serve as information repositories or they debunk anti-vaccination claims, neither of which get to the emotional core of anti-vaccination attitudes.”

Those attitudes are often grounded in parental concern, Smith said.

“Additionally, we have to remember that these groups usually don’t call themselves anti-vaccine, they might be ‘pro-safe vaccines’ or ‘in favor of vaccine choice,’” she said. “They appeal to parents’ protective instincts, and really tap into the genuine pain caused by childhood illness and death, which seemingly lack an adequate medical explanation.”

The National Vaccine Information Center, a misleadingly legitimate-sounding organization with 213,000 likes on Facebook, has urged parents not to vaccinate their children since the 1980s. Stop Mandatory Vaccination, one of the largest anti-vaccination pages with 127,000 likes, is run by a social media activist who crowdfunds to advertise his messages to pregnant women on Facebook.

Though Vaccinate Your Family has more Facebook followers than Stop Mandatory Vaccination, the anti-vaccine content travels much further. In the last two years, articles from Stop Mandatory Vaccination’s website were shared on Facebook more than a million times, according to the social media analysis tool BuzzSumo. Vaccinate Your Family’s content was shared just over 1,000 times.

Larry Cook, the self-described social media activist behind Stop Mandatory Vaccination, described the reason behind the disparity, telling BuzzFeed News, "The hardcore pro-vaccine advocates do not create content, Page and Groups, that attract large followers to Facebook since that line of thinking is already the common conversation and agreement in mainstream media and the public eye.”

Pisani said they’re trying.

“The people on our page are really engaged,” Pisani said. “It’s been really impressive. Of course we get a lot of pushback. We’ll put out a post and get the same people making the same ridiculous claims.”

“Everyone has questions about vaccines,” Pisani said. “We’re polite to people who have questions. We’re not in their face and we never never argue with anti-vaxxers. We just want to get to those people before they get swooped into the nonsense.”

Some amateur vaccine advocates are more than willing to enter the fray.

Stephan Neidenbach, 38, a middle-school technology teacher from Annapolis, Maryland, runs “We Love GMOs and Vaccines,” a Facebook page he started in 2014, he said, to combat growing misinformation on Facebook.

At first Neidenbach said he was just anonymously replying to anti-vaccine content, but soon scientists, farmers and doctors started following the page and sharing.

The page — now with with 194,000 followers — is one of several on Facebook that respond directly and in-kind to anti-vaccination pages. Users share news reports about vaccine outbreaks, and post memes and screenshots of posts from anti-vaccine groups, which they ridicule in the comments.

One recent post read, “If you're antivaxx and you see me making fun of antivaxx people, I just want to say that I am talking about you personally and I hope you're offended because you're f------ stupid.”

“That’s what separates me from other organizations,” Neidenbach said. “I’m not an organization, and I’m not trying to run a nonprofit. I’m just a school teacher. And I don’t have to be as nice as I do in the classroom.”

“They have to worry about being professional,” he said. “But we can do more inflammatory stuff that the World Health organization can’t do. And the inflammatory stuff, as you can tell by the anti-vaxxers, does well on Facebook.”

“I’d love to find someone with more of a medical or scientific background to take it over, but I haven’t found anyone yet who wants to. I guess most scientists and doctors don’t have the time to do this on the side. For now, it doesn’t take much effort.”

As platforms take steps to address the spread of anti-vaccine content, Pisani is hoping that Facebook and others will promote Vaccinate Your Family’s reputable content — even if past attempts to work together have been unsuccessful.

Pisani said former first lady Rosalynn Carter, a co-founder of Vaccinate Your Family, wrote a letter to Facebook CEO Mark Zuckerberg in 2016 on behalf of the organization, after Zuckerberg posted a photo of himself with his infant daughter with the caption, “Doctor's visit — time for vaccines!”

“We wanted to work with him and his wife to talk about other ways to promote vaccines,” Pisano said. “We didn’t ask him to fix the internet, or Facebook.”

They didn’t receive a reply.