In a major speech on Monday he will call for search engines to block any results being displayed for a blacklist of terms compiled by the Child Exploitation and Online Protection Centre (Ceop).
The government has been involved in negotiations with technology firms over the best way to crack down on child abuse and the main service providers have agreed to introduce “splash pages” that tell people if they are attempting to view illegal images.
But the prime minister will call on firms to go further, with splash screens warning of consequences “such as losing their job, their family, even access to their children” as a result of viewing the content.
Mr Cameron’s initiative follows a meeting at Downing Street last week with the parents of Tia Sharp and April Jones. Mark Bridger, who killed April Jones, and Stuart Hazell, murderer of Tia Sharp, were both found to have accessed child and violent pornography.
The prime minister told BBC1’s Andrew Marr Show he was prepared to bring in new laws if necessary.
He said: “I’m concerned as a politician and as a parent about this issue, and I think all of us have been a bit guilty of saying: well it’s the internet, it’s lawless, there’s nothing you can do about it.
“And that’s wrong. I mean just because it’s the internet doesn’t mean there shouldn’t be laws and rules, and also responsible behaviour.”
He welcomed the steps already being taken by internet firms, but added: “There is this problem … that some people are putting simply appalling terms into the internet in order to find illegal images of child abuse.
“And, remember, every one of these pictures is a crime scene and they’re getting results. I think it’s wrong that they should get results and we need to have very, very strong conversations with those companies about saying no, you shouldn’t provide results for some terms that are so depraved and disgusting, I can’t even say them on your show.
“And that, I think, there’s going to be a big argument there, and if we don’t get what we need we’ll have to look at legislation.”
He added: “Look, I believe in free speech, but free speech doesn’t mean you have the right to incite murder, it doesn’t mean you have the right to incite child abuse.
“So it’s about companies wanting to act responsibly. If you think about it, there’s really a triangle here. There are the people uploading the images. We’ve got to go after them. There are the people looking at the images. We’ve got to go after them. But there is also in this triangle the companies that are enabling it to happen, and they do need to do more to help us with this.”
Cameron will reject in his speech on Monday attempts by the internet companies to claim that the task is beyond their capability as he sets the October deadline. Saying the government will do “whatever it takes” to tackle the problem, he will urge the firms to hold “hackathons” – events where software experts collaborate – to produce solutions.
“I have a very clear message for Google, Bing, Yahoo! and the rest. You have a duty to act on this and it is a moral duty,” he will say.
“I have called for a progress report in Downing Street in October, with the search engines coming in to update me.
“The question we have asked is clear: if Ceop give you a blacklist of internet search terms, will you commit to stop offering up any returns to these searches?
“If in October we don’t like the answer we’re given to this question, if the progress is slow or non-existent, then I can tell you we are already looking at the legislative options we have to force action.
“And there’s a further message I have for the search engines. If there are technical obstacles to acting on this, don’t just stand by and say nothing can be done; use your great brains to help overcome them … you are part of our society and must play a responsible role in it.”
A Google spokesman said: “We have a zero tolerance attitude to child sexual abuse imagery. Whenever we discover it, we respond quickly to remove and report it.
“We recently donated $5m (£3.28m) to help combat this problem and are committed to continuing the dialogue with the government on these issues.”
Pressure to act against online child abuse content has increased in recent months following high-profile murder trials of Bridger and Hazell.
A Number 10 spokeswoman said: “Blocking certain search terms is just one part of the solution. Tomorrow, the PM will also set out how the government will help Ceop and the police to do more to crack down on online pornography and to make the internet a safer place for our children.”