The internet is a huge achievement and an immense force for good. It allows free access to information at the click of a mouse. It is transforming African countries through innovations such as mobile banking. However, there has been a confusion between the internet itself, or strictly speaking the world wide web, created by scientists and governments, and the companies that have monopolised it like Google and Facebook.

The net may now be tightening around the web behemoths.  The Tory manifesto next week is going to introduce new rules on internet privacy and place responsibility on social media companies to remove extremist and illegal content.  A new data protection bill will give users a “right to delete” information and images posted when they were children.

It’s all very tentative, of course.  The law has taken a long time to catch up with the greatest disruption to the means of communication since Gutenberg.  Internet companies have exploited “safe harbour” legislation originating in the USA to exempt themselves from responsibility for the material they publish on line.

Hitherto, web companies have portrayed themselves as neutral “platforms” – tech companies – rather than publishers. This has allowed Google, Twitter and Facebook to become three of the largest publishing companies in the world, essentially, by recycling plagiarism, hate speech and defamation on an industrial scale. This era may be about to come to an end.

The recent report from the Commons Home Affairs Select Committee calling for internet firms to be prosecuted for “dangerous and illegal” content was a landmark. MPs claimed to be horrified by the ease with which racial hatred and paedophile images could be accessed on Google, Facebook and Twitter. They were even more horrified that offending content was still there six weeks after the companies were notified.

This should have come as little surprise. Women have been complaining about social media abuse for years. First Minister Nicola Sturgeon has received death threats which are under police investigation. So, why have MPs only woken up to this now? It was the assassination of the Labour MP Jo Cox that provoked this investigation, after it emerged that her assailant had been accessing fascist material on the internet. But there is also a dawning realisation that the freedom of the web is being abused by digital behemoths.

These tech giants have been immune to anti-trust law, copyright and defamation because they’ve claimed to be a neutral “pipe” through which material is exchanged. They like to compare themselves to electricity and telephone companies. You wouldn’t claim that BT is legally responsible for everything said in every telephone conversation.

But this will no longer wash. Advertising is the original sin of the web. Once they started making money on a colossal scale from the content they reproduced they ceased to be a platform and became, in effect, publishers. These companies developed automatic programmes, or algorithms, that hoovered up content from newspapers, books, rival websites, and republished it surrounded by advertising space which they sold to the highest bidder.

This plagiarism was bad enough, but the algorithms also hoovered up and placed advertising indiscriminately on anti-semitic, paedophile and Islamic fundamentalist material. Right wing extremists discovered that they could manipulate the algorithms and get Google’s search results to promote their hate speak – as the journalist, Carole Cadwalladr discovered last year when she searched Google for “Jews are…” and it auto-completed as “evil”.

In truth, Facebook and Twitter are just websites, like The Herald’s. Yet, The Herald is required to monitor every comment posted on its site to ensure it complies with defamation and laws against incitement to hatred. If a comment is posted that is defamatory, the newspaper publisher is sued; yet if exactly the same comment is posted on Twitter, only the poster is liable.

When Lord McAlpine was defamed on Twitter, he sued thousands of people, including many journalists and the wife of the Speaker of the House of Commons. When Melania Trump was defamed by the Daily Mail, it was the publishers of the newspaper who were liable and had to pay up. This is only fair: it is the publishers who disseminate and distribute the material and, crucially, make money from doing so. They are equally responsible.

Google, Twitter and Facebook are the biggest and wealthiest publishers in history. They cannot remain above the law. And when publishing law finally catches up with them, as it must, then their business models will collapse because of the cost of compliance – of monitoring billions of posts. If I were an investor, I’d do what they’ve done: take the money and run.