Online music videos will carry an age classification from October as part of a pilot scheme by YouTube, music video service Vevo and the British Board of Classification to protect children from "graphic content", David Cameron has announced.

In a speech to the Relationships Alliance on Monday, the prime minister said the rules for online videos should be brought into line with content bought offline as he admitted that he had banned his own children from viewing some videos.

Cameron said: "Helping families with children and parenting shouldn't stop at childbirth. To take just one example – bringing up children in an internet age, you are endlessly worried about what they are going to find online. So we've taken a big stand on protecting our children online. We're making family friendly filters the default setting for all new online customers, and we're forcing existing customers to make an active choice about whether to install them.

"And today we're going even further. From October, we're going to help parents protect their children from some of the graphic content in online music videos by working with the British Board of Film Classification, Vevo and YouTube to pilot the age rating of these videos."

The prime minister said that the internet should not be exempt from the rules of society. He said: "We shouldn't cede the internet as some sort of lawless space where the normal rules of life shouldn't apply. So, in as far as it is possible, we should try to make sure that the rules that exist offline exist online. So if you want to go and buy a music video offline there are age restrictions on it. We should try and recreate that system on the internet."

Cameron said he has blocked his children from watching some content online. He said: "As for my own children I am sure there are times when they have been disappointed because they haven't been able to do something or see something. But that is part of what being a parent is about – being able to deploy the use of the word no and sometimes even to deploy the off switch on the television, unpopular as that can sometimes be, and sometimes ineffectual because they find another screen somewhere to switch on."