Cleaning up social media has pitfalls

President-elect Donald Trump is already reshaping the Internet. A great cleanup has begun, a weeding-out of the fake news stories and hateful commentary that surfaced so often during the presidential campaign, usually on social media sites.

This reckoning — undertaken by internet giants like Google, Facebook, and Twitter over the past few days — might make the online environment tidier and more trustworthy, but also, perhaps, a little less free.

They are taking aim at fake pro-Trump stories like one reporting a phony endorsement of Trump by Pope Francis that attracted millions of readers, or the one about Hillary Clinton’s nonexistent $200 million mansion in the Maldives.

Meanwhile, the surging white nationalist “alt-right’’ movement has used Twitter as one of its favorite communications channels.

Acting now, after the election, is a transparently political move by companies that could have cracked down on this stuff years ago. Instead, Facebook and Google earned big audiences and big dollars by selling ads on phony news sites that spread outrageous falsehoods. And Twitter barely flinched while some of its users terrorized others with abusive and threatening messages.

Last week, Facebook chief executive Mark Zuckerberg initially dismissed criticism that fake news on his site influenced the election.

That assertion has reportedly been challenged by some of his own employees, who are said to be forming an unofficial task force to examine how the powerful company could better police spurious information.

Then on Monday Facebook joined Google in announcing that sites that routinely publish false stories will be barred from joining their advertising networks. One could easily conclude the crackdown is coming now because the center-left leadership of these companies suspects that the anything-goes policy helped elect Trump.

That means these sites won’t be able to display ads generated by either company. Purveyors of fake news will be cut off from the Internet’s biggest revenue stream.

There’s no risk of censorship here. Ideologues and hoax-mongers will be free to keep on cranking out inflammatory fables, and their Facebook fans can keep sharing the phony news with their phony friends. But if fake stories can no longer turn a profit, we’ll probably see a lot fewer of them.

Most members of the mainstream media despise fake news, like the fabricated story claiming that in 2013, Hillary Clinton gave a speech praising Trump and urging him to run for public office. So it’s a good idea that Google and Facebook are planning to remove the profit from that sleazy business.

Implementing the new policy won’t be a cakewalk. The biggest challenge: Who decides which stories are fake? Melissa Zimdars, an assistant professor of communication at Merrimack College in North Andover, has taken a crack at the problem, creating a list of about 130 websites that she posted on the Internet on Monday and that has since been widely shared in media circles.

Already, though, Zimdars has had to remove several sites from her list after confirming that they weren’t so bad after all.

Nabanita De, a graduate student at the University of Massachusetts at Amherst, hopes to automate the process with an Internet-based truth detector she calls FiB. The software extension for Google’s Chrome browser will check the sources of the stories on your Facebook page against a public database that rates the trustworthiness of websites.

If a story comes from a low-rated site, it will search for similar stories from reliable sources. If it can’t find any, you’ll see an icon warning you that the story might not be true.

A war on fake news seems like a fine idea, because there’s little risk of collateral damage. But Twitter’s attack on alt-right extremists is far more problematic.

The new feature that lets users block incoming vulgarities and racial epithets is censorship done right, by individuals rather than governments or corporations.

But Twitter has also purged several alt-right users who’ve expressed white supremacist opinions, such as the notorious Richard Spencer. I’ve read some of Spencer’s stuff and, yes, it’s repulsive. But has he advocated violence or law-breaking?

And Twitter hasn’t said whether he harassed anybody in the manner of alt-right troublemaker Milo Yiannopoulos, who orchestrated an awful campaign of abuse against actress Leslie Jones. Spencer just believes terrible things, and says so.

It’s hard to back Spencer, but who’s next? Should Twitter root out users who oppose gay marriage or favor sharia law? Plenty of people consider such views hateful. Why shouldn’t Twitter silence them too? The company’s got the right, and as a for-profit business, Twitter also has a right to protect its brand.

But when one company can decide what 300 million people will read, it should use that power very sparingly indeed.

After all, panicked liberals fear that the rise of Trump will herald the decline of liberty. If Twitter isn’t careful, those liberals could be right.

Hiawatha Bray can be reached at hiawatha.bray@globe.com. Follow him on Twitter @GlobeTechLab.