Internet users should boycott "vile" websites that allow cyberbullying to help prevent more deaths of young people, the prime minister has said.

David Cameron asked parents to boycott sites that granted bullies unmoderated access to young people and said those who posted abuse online were not above the law.

He urged website operators to act responsibly to protect children from bullies, following the death of 14-year-old Hannah Smith, who killed herself on Friday after receiving abuse on Ask.fm.

Her father, David Smith, has said those who run the website should face murder or manslaughter charges and called for more regulation of social networking sites.

The government has been criticised for not doing enough to tackle online abuse directed at children.

Cameron told Sky News: "The people that operate these websites have got to step up to the plate and show some responsibility in the way that they run these websites.

"Just because someone does something online, it doesn't mean they're above the law. If you incite someone to do harm, if you incite violence, that is breaking the law, whether that is online or offline.

"Also there's something all of us can do as parents and as users of the internet and that is not to use some of these vile sites. Boycott them, don't go there, don't join them – we need to do that as well. I'm very keen we look at all the action we can take to try and stop future tragedies like this."

His comments were welcomed by Emma-Jane Cross, from the campaign group Beatbullying, who said Ask.fm had to start taking children's safety more seriously.

"For some young people, this site has become an ecosystem of hate and we must ensure that cases like Hannah's can never happen again," she said. "Until this happens, we're calling on the public, young people, parents and schools to boycott Ask.fm."

The Labour MP Barry Sheerman has called for the creation of a cross-party commission on cyberbullying in order to understand the extent of the challenge facing children and their parents.

"The government is simply not showing enough leadership in this area. The fact is, the response has been inadequate," said Sherman, co-chair of the skills commission, an independent body that meets in parliament to discuss education. "Childhood is being squeezed all the time, particularly by the horrific manipulative bullying children are now exposed to online.

"We need the government and leadership across the political parties to come together and tackle this. There is no simple solution, we need to find a balance between legislation and conversation with the people who run these sites, but if the law needs changing then lets do it."

Diane Abbott MP said the education secretary had to rethink policy and give greater importance to teaching children about relationships.

"I think the main failing of the government in this issue is Michael Gove's refusal to make sex and relationship education compulsory in all schools," she said. "This would mean that children would not only learn about how to cope with sexting and pornography but they would also discuss how to relate to each other on the internet."

Parenting websites joined the calls for greater scrutiny of social networks such as Ask.fm. "It is not enough to say parents and teachers need to monitor their children's internet use – they do, but there will always be a disconnect, and parents will always be one step behind," said Netmums founder Siobhan Freegard. "We need action from pressure groups, experts and the owners of these websites themselves, but ultimately there needs to be action taken by the government."

Ask.fm, which allows users to send messages anonymously, described Hannah's death as a "true tragedy" and promised to work with police investigating the incident.

In a statement, a spokesperson said: "Ask.fm actively encourages our users and their parents to report any incidences of bullying, either by using the in-site reporting button or via our contact page. All reports are read by our team of moderators to ensure that genuine concerns are heard and acted upon immediately and we always remove content reported to us that violates our terms of service."