Websites that allow people to post malicious messages, will be forced to reveal the users' identities.

The government wants to make it easier to expose people behind online attacks, so they can be sued in court for defamation.

Last week Facebook was ordered to reveal the details of cyberbullies who targeted a mum because of who she supported on the X factor.