TO understand the problem with Facebook, and why its entire business model may be about to collapse, just go below the line. Every reader comment at the foot of this article, when it appears on the internet, has to be monitored. If something is posted that is defamatory, discriminatory or includes illegal hate speak, the newspaper publishers are liable to prosecution. However, if that exact same remark is posted on Facebook, Twitter or Google, then the company is not seen as liable.

This double-standard goes to the heart of a row that looks set to dominate 2018 as governments attempt to rein in the power of the web behemoths. Fake news, twitter abuse, bots, rampant racism, Isis videos carrying ads for respected companies – all these disagreeable developments arise from a singe legal anomaly: the biggest publishers on the planet are not responsible for what they publish.

Facebook et al insist that they are not publishers, but merely platforms. We are like a telephone line, they say. No one would dream of prosecuting BT for defamatory remarks on phone conversations, so why pick on poor tech companies who “do no evil” and just want to make the world more connected? The most obvious reason of course is that such private telephone conversations are not reproduced on lucrative website publications for all the world to read.

Facebook and Google have managed to get away with this immunity for a decade or so and have become two of the largest companies on the planet as a result, with earnings of countless billions. Yet, Googlebook are just websites like the Herald's – the only difference is that they don't generate the content but “borrow” it from elsewhere – often the conventional media. They then make vast amounts of money from plagiarised or user-generated content by plastering it with adverts.

If you make money from posting specific content on your website, then you cannot avoid responsibility for it, and it doesn't matter who generated it. Between them Google and Facebook take up to 80% of all new web advertising. Newspapers and conventional media organisations, which still generate most of the news content used by the net giants, have been eviscerated. Googlebook then use the data they harvest from their billion or so users and make yet more money, which they have a habit of parking in tax havens.

The reason fake news spreads so fast is because people make money out of it through the Facebook and Google algorithms. This computer programme functions just like an editor of a newspaper, only it selects stories, not on the basis of originality, veracity or public interest, but to the extent that it corresponds to the prejudices of its readers.

Facebook, as most people now know, creates what are called “filter bubbles” which means people are only fed material which they are expected to like. It is a little like a personal brainwashing machine. This is perverse editing, but it is editing nevertheless.

Facebook and Google exercise discrimination, selection and projection of content in exactly the same way a conventional publisher does – only they do it without taking any responsibility for the content, and simply rake in the cash.

This will have to end, and in 2018 it probably will as western governments start to apply the rule of law to the web. It was never envisaged by its founder, Tim Berners-Lee, that his ground-breaking invention should be used in this way. It was the insatiable greed of the 2.0 generation that perverted the web and turned it into a machine for pandering to the very worst aspects of the human condition.

If Facebook had simply acted as a neutral platform, and perhaps funded its operations by donations like Wikileaks, then its claim to be a mere tech company might have had some merit. But it doesn't: as former Facebook executives like Sean Parker and Chamath Palihapitiya have admitted these organisations created a dysfunctional and socially divisive ecosystem capable of “ripping apart” society.

That the web behemoths are indeed publishers is abundantly clear from the legislation they hide behind. Net companies lobbied for and won a clause in the 1995 Communications Act in the US which specifically exempted them from the normal laws of publishing, such as defamation and copyright. This will have to be reversed. Urging tech publishers to take down paedophile images, fake news or racist abuse is bound to fail. This is because, as soon as Twitter or Facebook start taking responsibility for their content by monitoring it, they will destroy their claim that they are not publishers.

The only option is to make clear in law that the companies are responsible, in exactly the same way as normal websites, for material posted on their sites. Governments doing this will be accused of trying to censor the web, and this is an issue that supporters of press freedom and civil liberty will have to address. As they try to tame the wild west that is the web, politicians will be unable to resist trying to regulate its content to make their lives easier. However applying publishing law to web companies is not the same as regulation and doesn't require new machinery .

There is no need for Leveson-style government regulation of the media, and any such attempt should be resisted. All that is necessary is that web companies should be held accountable to the existing laws of the land. It is illegal to incite racial hatred, spread child pornography, tell lies about individuals, and to fraudulently mislead the public for financial gain. As soon as web companies are subject to the existing laws of publishing and copyright, as recommended by Lord Bew, chair of the independent committee on standards in public life, most of the problems will disappear overnight, along with, it has to be said, a lot of Facebook's revenues.

However, these are very clever firms. I'm sure that, as soon as the law is applied, internet firms will magically discover ways of preventing Isis recruitment videos appearing on YouTube, or allowing fake news sites to claim that Hillary Clinton runs a paedophile ring, or post racial abuse about Diane Abott or death threats to Nicola Sturgeon. They will do this for the same reason that the editor of this paper ensures that such content would never appear in the pages of The Herald: because the publishers would be prosecuted or sued. The risk of going to jail concentrates the mind wonderfully.