Are you perhaps confused because I mentioned the Communications Decency Act? It's true that one of the purposes of the CDA was to regulate pornography on the internet (although I don't think it was about child pornography--the pornography concern was about children seeing pornography on the net), but those parts of the CDA were struck by the Supreme Court in Reno v. American Civil Liberties Union, 521 U.S. 844 (1997).
The CDA also, in section 230, said that providers and users of interactive computer services are not to be treated as the publisher or speaker of any information provided by another information content provider. Section 230 was not struct down in Reno v. ACLU, and remains in force.