Skip to content

404 error: what it means and when it is the right response

Author: Matteo Pellegrini

A 404 error is the response a server gives when the requested address doesn't match any resource: the server answers and the site works, that URL doesn't.

The useful thing to know straight away is that in most cases the 404 is the right response and shouldn't be covered up with a redirect. Google's help page says it in so many words: "404 errors won't impact your site's search performance". The trouble starts when you try to hide them.

What the HTTP specification says

The code is defined in RFC 9110, the HTTP standard published by the IETF in June 2022, which replaced RFC 7231. Section 15.5.5 puts it like this: the 404 status code indicates that the origin server did not find a current representation for the target resource "or is not willing to disclose that one exists".

That second part is almost always skipped, and it explains something you come across often. A server can answer 404 for a resource that very much exists, just so as not to admit it's there. That is why some private areas return 404 instead of 403 to users without permission: saying "it exists but you can't come in" is already information.

The other point the specification spells out: a 404 doesn't say whether the situation is temporary or permanent. When the server knows the resource won't come back, the RFC prefers 410 (Gone), designed to tell whoever links to it that the link should be removed.

For Google, 404 and 410 are the same thing

The Search Console documentation is explicit: "Currently Google treats 410s (Gone) the same as 404s (Not found)". Choosing between the two doesn't change rankings. If anything it changes how quickly Googlebot stops retrying that address, and how clear things are for other crawlers that do respect the distinction.

Below are the four ways of responding to a URL that no longer exists, and what each one communicates.

ResponseWhat it tells the clientWhen to use itEffect on inbound links
404 Not FoundThe resource isn't there, and it's not known whether it will come backDefault for any URL that doesn't existThe value of the backlinks is lost
410 GoneThe resource was removed on purpose and won't come backContent deleted deliberately: expired promotions, closed profilesFor Google, identical to a 404
301 permanentThe content has moved to another addressOnly if an equivalent page existsThe value passes to the new URL
200 on an error pageAll fine, here's the contentNever: this is the soft 404Google drops it from the index anyway, only more slowly

Where 404s come from

The causes fall into two groups with very different consequences. First there are the ones outside your control, and they are the silent majority: a user who mistypes, another site linking to you with a mangled address, Googlebot trying to follow a string it found inside a JavaScript file. The Search Console help page mentions this last case specifically and makes clear it affects neither the crawling nor the ranking of the site.

Then there are the internal ones, the only ones worth acting on. A page deleted without a redirect, a slug changed after publication, a migration that didn't carry over the map of old addresses, a corrupted .htaccess file that sends half the site into error. On WordPress the classic is changing the permalink structure without generating the mappings: from one moment to the next every indexed URL returns 404.

Plenty of articles on the subject claim that Google penalises the indexing of sites that pile up too many 404s, and in some cases the whole domain. The official documentation says the opposite: you can "safely ignore them if you're certain that the URLs should not exist", and the errors drop out of the report after about a month.

The real cost lies elsewhere, and it concerns backlinks. Ahrefs measured link mortality across a sample of 2,062,173 websites, looking at links collected from January 2013 onwards: 66.5% had rotted. In the breakdown of lost links, 4.11% ended up on "not found" pages (Ahrefs link rot study, international sample). Every backlink pointing to an address that now returns 404 is authority earned and then thrown away.

The soft 404 is the serious problem

Google calls a page that returns 200 but shows error content a soft 404. It's in the guide to HTTP status codes: if the content suggests an error, for example an empty page or an error message, Search Console reports a soft 404.

It almost always comes from two well-meant moves. The first is a custom 404 page built like any other page, which therefore returns 200 instead of the error. The second is the mass redirect to the home page: every dead address redirected to the homepage so as "not to lose traffic". Google advises against it explicitly, along with blocking 404s via robots.txt, because both make it harder for Google to work out the structure of the site.

Checking takes one command. With curl -I https://example.com/non-existent-page you read the first line of the response: if you see HTTP/2 200 on a page that is clearly an error, that's a soft 404. It's one of the checks that always ends up in a technical SEO audit, because nobody notices it looking at the site in a browser, like most of the other common URL problems.

When to just leave the 404

A 301 redirect makes sense when there is equivalent content on the other side. If there isn't, a 301 to any old page is a soft 404 in disguise and makes the experience worse: someone looking for a discontinued product page lands on a generic category and leaves. A 302, which signals a temporary move, is even worse on a deleted page, because it keeps alive an address nobody will reactivate.

The pages to leave dead are the ones with no real replacement: a past event, a closed job ad, a discontinued product with no successor, an emptied category. Search Console flags them for about a month, then stops showing them.

How to find the 404s that are worth something

In Google Search Console the Page indexing report has a "Not found (404)" reason with the list of addresses. It's the starting point, with one clear limit: it doesn't tell you which of those URLs have inbound links, in other words which ones are costing you something.

For that half you need a backlink tool. In Ahrefs the path is Site Explorer, Best by links report, filter on the HTTP response "404 not found", sorted by referring domains. At the top you'll find the dead pages that still have links pointing at them: a 301 to the equivalent content recovers them in an afternoon, and it's the quickest way to gain authority there is. Screaming Frog covers the other side of the problem, broken internal links within the site, which are also the only ones that are genuinely your fault.

A 404 page that does something useful

It should say what happened without jargon, offer site search and lead to the two or three main paths through the site. Above all it must return 404: on WordPress the template is the theme's 404.php file, on Apache you set it with the ErrorDocument 404 directive, on nginx with error_page 404. If your site is on Shopify or another closed platform, the platform handles the code and there isn't much for you to touch, but it's still worth checking.

Then there's something hardly anyone does: measuring it. The 404 page is the only page on the site that is never designed and almost never looked at in the data, yet giving it a recognisable path in GA4 is enough to read the referrers of the people who land on it. That list contains the broken external links pointing to your site, the ones Search Console doesn't show you because it has never crawled them. With half an hour of setup the error page becomes the detector for your rotten links, and if handling details like these is eating too much of your time, it's exactly the work we do in Visilay's SEO services.

404 error: frequently asked questions

Does a 404 error hurt rankings on Google?

No. The Search Console help page states that 404 errors won't impact your site's search performance. What really costs you is the value of backlinks pointing to pages that are now dead, not the code itself.

Is it better to use a 301 redirect or leave the 404?

It depends on what's on the other side. If an equivalent page exists, the 301 is the right choice and keeps the value of the links. If it doesn't, redirecting to a generic page or to the home page produces a soft 404 and a poor experience: in that case, leave the 404.

What is the difference between a 404 and a 410 error?

Under RFC 9110 a 404 doesn't say whether the absence is temporary or permanent, while a 410 (Gone) states that the resource was removed on purpose and won't come back. Google, however, says it treats the two codes the same way.

What is a soft 404?

It's a page that returns a 200 code but shows error content, for example a badly configured custom error page or a mass redirect to the homepage. Google detects it and reports it in Search Console, because the HTTP code contradicts what the user sees.

How long do 404s stay in Search Console?

According to Google's documentation, 404 errors stop appearing in the report after about a month, if the URL is no longer found and reported.

Matteo Pellegrini

Matteo Pellegrini

I’m a Business Developer, and at Visilay I focus on developing data-driven SEO, Google Ads, and CRO strategies. I love historical museums, have been practicing Karate for as long as I can remember, and on weekends I enjoy exploring Italian villages in search of authentic local food.