HTTPfy

404 Not Found

The server cannot find anything at the requested URL.

404 at a glance

Code
404
Name
Not Found
Class
4xx Client error
Status
IANA-registered standard code
Defined in
RFC 9110, Section 15.5.5
Cacheable by default
Yes, heuristically cacheable (RFC 9110 section 15.1): without Cache-Control or Expires, caches may store it and pick a freshness lifetime themselves. Send explicit Cache-Control to stay in control.

What 404 means

404 Not Found means the origin has no current representation for the target URI, or will not disclose one. It says nothing about whether the absence is permanent; 410 Gone does. 404 is heuristically cacheable, so CDNs may cache misses briefly.

What typically causes a 404

  • Broken links, typos, or pages deleted without a redirect.
  • Single-page apps on nginx without try_files $uri $uri/ /index.html;, so deep links 404 on reload.
  • Case sensitivity: /About and /about are different files on Linux servers.
  • Wrong document root or location/alias mismatch in nginx; Apache rewrite rules not enabled (AllowOverride None).
  • S3 NoSuchKey; API routes missing the version prefix or using the wrong method on frameworks that 404 instead of 405.
  • Kubernetes ingress returning its default backend "404 page not found" when no Ingress rule matches the host.

Fix it on the server

  • Return a real 404 status for error pages (not 200), and a helpful page with search or navigation.
  • When content moves, add a 301 or 308 instead of leaving a 404.
  • Use 410 if a page is removed on purpose and should drop out of search results faster.
  • Set a short Cache-Control on 404s so a fix becomes visible quickly behind a CDN.

Fix it as a client or visitor

  • Check spelling, case and trailing slash. Go up one level in the path to find the section.
  • For APIs, confirm the base URL, version prefix and resource ID.

Headers that go with 404

HeaderRole
Cache-ControlControls how long CDNs keep the miss.

Example response

HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Cache-Control: max-age=60

<h1>Page not found</h1>

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.