Error 404
A 404 error, also known as 404 Not Found, is an HTTP response status code indicating that the server could not find a resource at the requested address. It may refer to a web page, image, file, or another resource requested through a URL.
A 404 response does not indicate whether the resource is temporarily unavailable or permanently removed. It only means that the server cannot currently find the requested content or is unwilling to disclose whether it exists.
What causes a 404 error?
Common causes of 404 errors include:
- entering an incorrect URL;
- deleting a page or file;
- changing a page’s address without setting up a redirect;
- publishing an outdated or incorrect link;
- incorrect CMS, routing, or server configuration;
- changing the URL structure during a website redesign or migration.
A 404 error can occur even when the server and the rest of the website are working correctly. It indicates that a particular resource is missing, not that the entire website is unavailable.
What should a 404 page include?
A website can display a custom 404 page that matches its visual identity, but the server should still return the 404 Not Found status code. Displaying an error message is not sufficient if the HTTP headers return 200 OK.
A well-designed 404 page should:
- clearly explain that the requested page could not be found;
- provide a link to the home page;
- include access to the main navigation;
- help users find related or important content;
- optionally provide a website search function;
- preserve the correct 404 HTTP response status.
404 error vs. soft 404
A soft 404 occurs when a page appears to report missing content but the server returns 200 OK instead of 404 Not Found or 410 Gone. This can incorrectly suggest to a search engine that the URL contains a valid page.
A soft 404 may also occur when every nonexistent URL is automatically redirected to the home page or another unrelated page. This approach can confuse users and make it more difficult for search engines to understand the website correctly.
404 Not Found vs. 410 Gone
404 Not Found is appropriate when a resource cannot be found and it is unclear whether the situation is permanent. 410 Gone more specifically indicates that the resource was intentionally removed and is likely to remain unavailable.
Websites are not required to return 410 for every permanently deleted page. A correct 404 response can also be used in this situation.
How can a 404 error be fixed?
The appropriate solution depends on the cause:
- restore the page if it should still exist at the requested address;
- use a 301 redirect if the page has moved to a relevant new URL;
- return 404 or 410 if the content has no suitable replacement;
- update links that point to an incorrect or outdated address;
- correct routing rules, permalink settings, or server configuration when they cause the error.
A redirect should lead to a page that genuinely replaces the missing content. Nonexistent URLs should not all be redirected to the home page automatically.
Do 404 errors affect SEO?
Individual 404 errors are a normal part of the web and do not automatically harm an entire website’s search performance. A nonexistent URL that returns the correct 404 status can eventually be removed from a search engine’s index.
However, numerous broken internal links can disrupt navigation and unnecessarily direct search engine crawlers to unavailable resources. Website owners should regularly review indexing reports, repair broken links, and use redirects only when a relevant destination exists.