A 404 error page is a manually created error page that is returned when a nonexistent page is requested by a client.
An example: if you request the URL https://www.sistrix.com/I-do-not-exist/, we have no content for that page. As the requested page does not exist and therefore has no content, our webserver will show you an error page (also called a 404 page) speficially created for this reason.
When a user requests a nonexistent URL on your website, you should return an individual error page that lets them know that the requested URL does not exist. You should also make sure that the server returns the correct HTTP status code “404“.
The HTTP status code “404” means “file not found” and is the exact opposite of the HTTP status code “200”, which is “file found.”
Table of Contents
- What are HTTP status codes for?
- Why is the HTTP status code 404 important for nonexistent pages?
- Why an automatic redirect is not the best solution
- Video explanation by Matt Cutts / Google on this topic
- Additional information about this topic:
What are HTTP status codes for?
The search-engine’s webcrawlers use the HTTP status code to check if the requested URL is available, HTTP status code “200”, or not, HTTP status code “404”.
Why is the HTTP status code 404 important for nonexistent pages?
Only when your server returns the correct status code, can search-engines realise that a URL is no longer available and then remove that URL from the index, after a certain time.
If a 404 page returns the wrong HTTP status code, for example “200”, then the URL can show up in the search results. The result looks like this:
Why an automatic redirect is not the best solution
To automatically redirect all incoming links to nonexistent pages to the landing page, by using the HTTP status code “301”, is not the best solution. In this scenario, the user will not get to where they expected to go and, even more importantly, will not know that the content is not available anymore.
Video explanation by Matt Cutts / Google on this topic
How does Google handle “not found” pages that don’t return a 404?
How does Google deal with ‘page not found’ pages that are returning a 200 response code instead of a 404? Is this a form of spam? Can Google determine this mismatch algorithmically?