Google placed the internet on a blacklist today after a mistake caused every site in the search engine's result pages to be marked as potentially harmful and dangerous.

The problem affected internet pages across the whole planet, and lasted for around 40 minutes before engineeers were able to fix it.

The glitch centred on Google's malware detector, which is designed to keep internet users from visiting sites Google believes may install malicious software when users browse them. Google blamed "human error" when an engineer tried to add one web address to the list of those deemed suspicious, and mistakenly added them all.

"We periodically receive updates to that list and received one such update to release on the site this morning. Unfortunately (and here's the human error), the URL of '/' was mistakenly checked in as a value to the file and '/' expands to all URLs. Fortunately, our on-call site reliability team found the problem quickly and reverted the file," Google said in its official blog.

The incident occurred at around 2.40pm.

Apart from lost advertising revenue – which one expert estimated at $2-3m (£1.4-2m) – the incident is embarrassing for the world's most popular search engine, known for its reliability.

Users across the globe were puzzled as all searches were met with the warning: "This site may harm your computer."

A spokesman for Google said: "A lot of people were woken up in California when the problem broke. Clearly Google was labelling every website as malware."

Google's paid search results appeared not to have been affected.