The Prime Minister unveiled a pilot scheme with YouTube and the British Board of Film Classification (BBFC) as he pledged to put strengthening families at the heart of everything the government does.
The drive will see the impact on families made a standard element of Whitehall’s assessments for policies.
Funding for relationship counselling through Relate is also being doubled to nearly £20 million.
Mr Cameron said politicians were often nervous of talking about relationships because they did not want to appear judgmental.
“I know that I am far from the perfect father and husband, and I will never pretend otherwise,” he said.
But the premier insisted the issue was too important for government to ignore. He said he was “proud” that the coalition was recognising marriage in the tax system, and had taken action to ensure people of all sexualities could marry.
“In as far as possible we should try to make sure that the rules that exist offline should exist online,” Mr Cameron said.
“So if you want to go and buy a music video offline there are age restrictions on it. We should try to recreate that system on the internet.”
The premier also gave an insight into his own efforts to prevent his young children from watching material they should not. “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,” Mr Cameron said.
“But that is part of what being a parent is about, is being able to deploy the use of the word ‘no’ and even sometimes to deploy the use of the off switch on the television, as unpopular as that might be – and sometimes ineffectual because they find another screen somewhere that is switched on.”
A BBFC consultation with more than 10,000 people last year found widespread anxiety about explicit content in music videos – including sexual scenes, drug-taking and self-harm.
The watchdog announced in January that it favoured a ratings system for online videos, with guidance stating: “The classification of a music video will take account of any elements which are of concern to parents, including glamorisation of behaviour which they consider inappropriate.”
Concerns have been raised in the past about Miley Cyrus’s Wrecking Ball video and “twerking” antics, and sexual content in Robin Thicke’s Blurred Lines.
From October music videos sold on DVD and other physical media will be required to have age ratings under the Video Recordings Act.
The BPI, which represents the recorded music industry in the UK, said labels would voluntarily submit videos likely to be rated 12 or above to the BBFC.
“The BPI agrees with government that, with so many more music videos now being released online through such sites as YouTube and Vevo, it is important this content is made available to the public in a responsible way, that is sensitive to the needs and concerns of younger viewers and their parents in particular,” a spokesman said.
“The BPI and its members are therefore working with the BBFC, Digital Service Providers and with the support of government on a pilot scheme that will trial age ratings for music videos released online through the UK.
“Technical details are still being developed, but the scheme will see UK record labels voluntarily submit content likely to be rated 12 or above to the BBFC for classification into 12, 15 or 18 age categories.
“Labels will then include this data with a ‘parental advisory’ style alert in its feed to the Digital Service Providers so that users, including parents, can make a more informed viewing decision.” The pilot will start on 1 October.