NetChoice, a tech lobbying group whose members include Twitter and Facebook, testified against the bill in March.
The bill, believed to be the first of its kind, will take effect on 1 July.
Mr DeSantis has been vocal about Big Tech, arguing that platforms such as Twitter, Facebook and YouTube are silencing conservative voices.
Earlier this year, he said Big Tech had “come to look more like Big Brother”.
Legal challenges are expected, with opponents contending that the bill violates Americans’ constitutional rights to free speech.
Critics also say the new law could have unintended consequences.
In March, Steve DelBianco, NetChoice’s chief executive, said while testifying against the bill: “Imagine if the government required a church to allow user-created comments or third-party advertisements promoting abortion on its social media page.
“Just as that would violate the First Amendment [guaranteeing the right to free speech], so too does [this bill] since it would similarly force social media platforms to host content they otherwise would not allow.”