The dream of internet freedom has died. What a dream it was. Twenty years ago, nerdy libertarians hailed the web as the freest public sphere that mankind had ever created. The Declaration of the Independence of Cyberspace, written in 1996 by John Perry Barlow, warned the ‘governments of the industrial world’, those ‘weary giants of flesh and steel’, that they had ‘no sovereignty where we gather’. The ‘virus of liberty’ was spreading, it said.

Now it seems that the virus has been wiped out. We live our online lives in a dystopian nightmare of Twittermobs, ‘safety councils’, official procedures for ‘forgetting’ inconvenient facts, and the arrest of people for being offensive. The weary giants are asserting their censorious sovereignty.

This week it was revealed that Facebook has been suppressing news stories from conservative sources. Facebook, used by 1.6 billion people, bigs itself up as a neutral distributor of news and facilitator of global chat. Yet, according to a former editor there, popular conservative stories are often kept off Facebook’s trending bar, either because the curator ‘didn’t recognise the news topic’ or ‘they had a bias’.

People log on to Facebook imagining that the stories they see are chosen by user ‘likes’, rather than by editors who decide what us web plebs should and shouldn’t know. In truth, this stuff is curated for us by our moral betters in Silicon Valley, who dish up decent liberal stories that might enlighten our mushy minds while hiding weird conservative news that might turn us Obama-phobic or funny about immigration.

The most surprising thing about this Facebook story was that anyone was surprised. Social media sites, vast planets of cyberspace, may advertise themselves as free meeting points for humanity, but for a couple of years now they’ve been casting out moral undesirables, blocking the offensive and engaging in political censorship.

Facebook has suspended gay users who have reclaimed the term ‘faggot’ to describe themselves. The former punk and proud tranny Jayne County has been thrown off Facebook for using the word ‘tranny’. After the Paris terror attacks, the comedian Jason Manford had his page taken down after he said that if God wanted the killers to do this, then He was a ‘massive c**t’.

Last month Facebook deleted a post criticising gay marriage, written by a Sydney academic, on the grounds that it breached ‘community standards’. The post was only reinstated when Tim Wilson, a former Australian human-rights commissioner, accused Facebook of censorship. If you’re conservative, don’t like mass immigration or cleave to the Christian view of marriage, watch your words online.

Facebook’s bans are political. In September last year Angela Merkel was overheard asking Facebook’s founder, Mark Zuckerberg, what he planned to do about offensive posts about the refugee crisis. ‘We need to do some work,’ he said. And he did. In February he said that in Germany, ‘with the migrant crisis here and all the sensitivity around that’, his service would clamp down on xenophobic posts.

Twitter, too, polices its users’ chat. It once described itself as ‘the free-speech wing of the free-speech party’; now it has its own Trust and Safety Council, stuffed with NGO people and feminists who aim to make it more ‘pleasant’. This isn’t about banning morons who make death threats; it’s about morally managing the conversation. In the words of Twitter’s British head of policy, Nick Pickles, the web has helped to make ‘challenging, even upsetting viewpoints… more visible’ in a way that is ‘not always comfortable’. So Twitter must think up ways of ‘drowning out’ uncomfortable viewpoints.

We’re witnessing a massive shift in the whole idea of the internet; from an open platform for the discussion of ideas to something that must be moderated and editorialised. Some argue that, as privately owned platforms, Facebook and Twitter are free to publish or take down anything they like. But it’s more complicated than that. These are vast entities. A full seventh of humanity uses Facebook. This gives it historically unprecedented clout. Facebook has more power to shape the agenda than any media mogul, pope or king in history. He who controls Facebook’s trending bar controls the present. Being turfed off the site for saying stuff its bosses don’t like seriously degrades your ability to be an engaged public person.

Facebook is now effectively the biggest public square in history; if we don’t have free speech there, we have a problem. Moreover, Facebook and Twitter’s move towards censoriousness isn’t simply a case of private companies doing their own thing. State bodies are pressuring internet giants to restrict free expression. From the Culture Select Committee’s grilling of Twitter bosses in 2013 over their failure to tackle ‘trolls’ to Merkel’s pressure on Zuckerberg, we’re witnessing attempts by the state to outsource censorship to private companies.

Consider the right to be forgotten. Endorsed by the European Court of Justice two years ago, this ‘right’ allows people to call on Google to remove from its search results links to old news reports about themselves that they find embarrassing. In the first year, there were 218,320 requests for links to be removed; 101,461 were granted. That’s 101,461 pieces of information you’ll never find if Google is your main means of perusing the past. One of the great liberties of cyberspace — the freedom to rummage through the events and ideas of yesterday — has been pummelled.

Increasingly the state is barging into the online world. In Britain hundreds have been arrested for the crime of being grossly offensive online. Between November 2010 and November 2013, more than 350 people were arrested for stuff they said on social media. In 2014, a 19-year-old was arrested after tweeting a joke about the Glasgow Christmas lorry crash that killed six people. Police Scotland took to Twitter to issue an unfunny warning: ‘Please be aware that we will continue to monitor comments on social media and any offensive comments will be investigated.’

Last month, Greater Glasgow Police went one better, instructing people to ‘Think… before you post’. Before we tweet or blog something, they said, we should ask ourselves: ‘Is it true? Is it hurtful? Is it illegal? Is it necessary? Is it kind?’

What’s with this Stalin-like invasion of the realm of speech? When the Chinese erected their Great Firewall online in 1997, Europeans scoffed. The internet was unpoliceable, they said; the wall would fall. Instead, we’re copying the Chinese approach. China’s Internet Surveillance Division has two cartoon police characters which warn web users to avoid posting ‘sensitive’ or ‘harmful’ material online; British cops now do the same.

It’s hard to remember a time when the state and assorted moralists have been so open about their urge to crush offensive thoughts. The Blairite idea of hate crime, under which everything from infantile racist blather to the mocking of the religious came to be considered criminal, has mashed together with technology and its speeding-up of the culture of complaint to give rise to some of the strictest constraints on thought and speech in British history.

Last month, the Guardian launched a campaign against the openness of the web, demanding something be done about the ‘dark side’ of online chat. Maria Miller, who chairs the Women and Equalities Select Committee, got in on the act. She said we needed ways to curb abusive commentary online because, in making some web users feel scared, such trolling can ‘actually stifle debate, lead to censorship’. So, the argument goes, we need censorship in order to guarantee a better kind of free speech. This is the digital world we all increasingly inhabit, where freedom is censorship, and censorship is freedom.