Platforms like WhatsApp, Signal, and iMessage say they cannot access or view anybody's messages without destroying existing privacy protections for all users and have threatened to leave the UK rather than compromise message security.
Who will regulate the Online Safety Bill?
Breaking the rules could result in fines of up to 10% of global revenue for tech companies, or £18m - whichever is bigger. Their bosses could also potentially face prison time as a punishment.
Ofcom says it will draw up codes of conduct that will guide how to stay within the new rules, with its first draft codes coming on 9 November. Its boss has also addressed some concerns about its new role.
"Ofcom is not a censor; our new powers are not about taking content down. Our job is to tackle the root causes of harm," said the regulator's CEO, Dame Melanie Dawes.
What do campaigners say?
The Equality and Human Rights Commission welcomed the law, calling it "a vital first step in addressing harmful content and behavior online."
Sir Peter Wanless, NSPCC chief executive, said the law "will mean that children up and down the UK are fundamentally safer in their everyday lives."
He added this is partly "thanks to the incredible campaigning of abuse survivors and young people".