Among the more absurd things ever said about the internet was that the network “interprets censorship as damage, and routes around it”. The epigram was half true, but the half that was false gets more important every year.

The internet can be a vile place, and the instinct to enforce some standards there is not misplaced. The director of public prosecutions, Alison Saunders, is quite right to say that crime online is as serious as crime offline. Even the Guardian, wedded to the idea of free speech, does not imagine that this is an unrestrained freedom – only that the limits that the law should set are minimal and largely concerned with public order. But some limits must exist, and they must be enforced.

The questions are: who should set these limits and who then should police them? Both governments and private companies have a part to play, even if government action often takes the form of demanding that private companies execute government policies. It is here that Ms Saunders may have gone too far in her zeal to keep the web clean. The justification for government censorship is that some hate speech is an incitement to violence or a dangerous ratcheting of community tensions, whereas some – no matter how offensive – should be permitted by law, even if we are happy for private companies to act against it. Personal abuse, when it is not accompanied by threats of violence or worse, should not be the domain of the government. Courtesy and respect are vital but best enforced by the owners of web spaces. The most effective action is carried out by companies many have never heard of, such as Cloudflare, an American company that handles about 10% of the traffic on the web, which has thrown the neo-Nazi site the Stormer off the internet. A representative of the Stormer, interviewed in last week’s Vice film about the far-right violence in Charlottesville, described how they used their virtual presence to build support in the real world, and described the journey to Charlottesville with other members of the “alt-right” as “stepping off the internet”.

Cloudflare has the power to silence the Stormer, at least partially, because it is in a position analogous to a wholesalers in the old newspaper business. It runs a “content distribution network”, which ensures that whatever is published through it reaches the people who want to read it. This involves distributing multiple copies all around the world, and protecting the publishers from the kind of electronic vandalism that can knock sites off the web.

You might think that no reputable company should be in the business of transmitting Nazi propaganda, but it is central to the business model and the legal position of companies like Cloudflare that they are not publishers but merely conduits, with no responsibility for the matter transmitted through them. It was the Stormer’s wholly false claim that Cloudflare sympathised with it that precipitated its expulsion.

But the claim that internet companies are wholly neutral conduits is not entirely true; nor should it be. Almost all the various links in the chain of programs that deliver the simplest of web pages to your screen are aware of the content, or could be, and will refuse to handle some of it. Child pornography is the obvious example, but Google and Facebook have both responded to pressure to remove politically extremist content. Of course there are illegal ways around these obstacles, but that’s not an argument against trying. Only online is the existence of criminals treated as an argument against the existence of laws.

In authoritarian countries the censorship of the net is far more complete, and often impossible to justify. The Trump regime may be moving in that direction, as is shown by its recent attempt to get the IP addresses of every visitor to a site organising demonstrations against him. The effort by the Chinese government to censor the output of the Cambridge University Press is more worrying. The publisher’s belated decision to resist pressure and reinstate 350 temporarily censored journal articles is admirable. It shows there is no single benevolent world authority to set the rules for the internet. Different countries will have different regulatory regimes, some better, some worse, and private companies will have varying ethical standards. That is inevitable. The central distinction that applies to governments is not the act of censorship itself, but the extent to which the rules are openly and democratically made, and fairly applied through an independent judiciary.