A federal appeals court has struck down an Indiana law that imposes broad social media restrictions on most registered sex offenders, finding it unconstitutional.

The U.S. Court of Appeals for the Seventh Circuit held that the law — which bars most registered sex offenders from using social networking websites, instant messaging services and chat programs — broadly bans protected speech rather than curtailing speech targeted to minors.