I don’t know the specifics of federal authority when it comes to internet, but I wouldn’t be surprised if it fell under interstate commerce, which is how they justify federal drug laws.
I can live in California and visit a site in California and my traffic might not leave the state. That is pretty much irrelevant now that Wickard v. Filburn is a thing though.