Skip to main content

Definition

What is a 404 Error?

Learn about the 404 Not Found status code, when it occurs, best practices for handling it, and what Google says about fixing 404 errors.

What Does 404 Not Found Mean?

The 404 Not Found status code indicates that a server is unable to find the requested resource. This code is commonly used when a page or resource is missing, deleted, or never existed.

When a server responds with a 404 Not Found status code, it means:

  • The requested URL is incorrect or has been removed
  • The requested resource does not exist on the server
  • The server is unable to find the requested resource

How Is 404 Different from 200 OK?

A 200 OK status code indicates that a request was successfully processed, and the result is available. In contrast, 404 Not Found indicates that the requested resource is not available.

When Is 404 Not Found Used?

  • Page not found: When a user requests a page that does not exist
  • Resource not found: When a requested resource, such as an image or file, is not available
  • Broken links: When a link is broken or the destination page has been removed

Best Practices for Using 404 Not Found

  • Customize 404 error pages to provide a better user experience
  • Provide clear instructions on what to do next
  • Use search engine friendly practices to help search engines understand the error

Notes From Googlers

According to Gary Illyes, "404 errors are not to be feared" and you shouldn't scramble to fix most of them. HTTP 404 codes fall into two categories: URLs that should return content but don't (fix these immediately), and URLs that correctly don't return content (some may be useful to redirect, others are genuinely unhelpful).

Additionally, avoid calling expensive backend functions on custom 404 pages unless justified, as high traffic to 404 pages can exhaust server resources.