This really isn't possible to implement in any practical or consistent way without contradictions in usability. If you made such a law, trolls such as Nazi-proponents would use it as a weapon to infect sites such as HackerNews with their walls of hate speech.
Moderators couldn't flag nor delete the hate speech as "off topic" because the Nazi group would complain of "censorship". Imagine that scenario: it would be against the law to delete hate speech here even though most us on HN would rather talk about programming languages or tech startups.
The way marginal groups have free speech now is at the level of DNS servers by buying a domain name. Instead of trying to get Facebook and HackerNews to host your hate speech by expanding "free speech to private entities", you create a Nazi domain (e.g NaziPartyUSA.com) and put your hate speech at that URL. Same for any ISIS group that wants to infect commercial websites like Facebook/HN with recruitment propoganda to attract followers who are willing to behead infidels.
The reason free speech advocates don't like that option is that they don't get an audience -- such as the millions of eyeballs at Facebook. Well, free speech doesn't guarantee an audience. The quantity of the audience is orthogonal to the free speech and the corporate censorship.