All UK Internet providers will block online porn later this year, prime minister David Cameron said. And if you want to see smut, you're going to have to ask for it by the end of the year.

Cameron also announced a ban on possessing online porn depicting rape—bringing England and Wales in line with Scotland's rules on the matter.

Automatic porn-blocking filters will be put in place for new Internet provider (ISP) customers by the end of the year, Cameron said, while current customers will be contacted by their providers to ask if they want to restrict adult material on their Internet-connected devices.

The country's biggest ISPs have agreed to the measures, meaning 95 percent of U.K. homes will be affected. 

Cameron announced a number of other measures designed to keep porn away from the eyes of children and child porn off the Internet as much as possible. From next year, police forces' databases will be linked to create a single database of "illegal images of children which will help police in different parts of the country work together more effectively to close the net on paedophiles," he said in a speech.

The prime minister indicated the Child Exploitation and Online Protection Centre (which believes child sex abuse images are becoming more commonplace online) will have more powers to probe the deeper parts of the Internet, those not indexed by search engines like Skype, password-protected websites, and black markets only accessible through routing software.

Cameron also wants search engines to help block illegal material and new laws to ensure streaming porn videos are subject to the same rules as those sold in sex shops.

The prime minister said earlier this year he wanted porn to be blocked from public Wi-Fi networks, and that's among the measures to be introduced "wherever children are likely to be present" and likely before the end of this month.

The idea of an opt-in policy was mooted last August by a British charity op-ed in the Daily Mail, which has campaigned for the porn blocking measures. There's a degree of irony that the Daily Mail routinely publishes photos of sexualized young women in various stages of undress. A cynic might suggest the Mail is hoping to sell more copies of the paper if Internet users find it too difficult to get their titillation online.

A sweeping block on porn across the Internet is a difficult proposition in practice. There's every chance that destinations that do not actually feature sexual images are swept into the list of blocked sites. That could make it more difficult for people to get information they need or want, and for people to do their jobs, without having the filters turned off.