4xx Client error · RFC 9110 §15.5.5

404 Not Found

The server found no resource at that URL.

What 404 means

The most recognised status code. The server is reachable and understood the request, but nothing lives at the path. It says nothing about whether the resource ever existed; 410 is for known-gone resources.

For APIs, 404 also covers a valid endpoint with an unknown id (/users/999). In access logs, bursts of 404s for paths such as /wp-login.php or /.env are automated scanners, not users.

Common causes

  • Typo in the URL or a broken link.
  • Resource deleted or renamed without a redirect.
  • Route not registered, wrong HTTP method mapped to another route, or a trailing-slash mismatch.
  • Reverse proxy forwarding to the wrong upstream path (missing or extra prefix).

How to fix it

  • Add a 301 redirect from the old URL when content moves.
  • Check the framework's route table and the proxy's path rewriting.
  • Serve a helpful 404 page with search and links; keep it noindex.

What it looks like

A typical response:

HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Cache-Control: no-store

The same event in an nginx access log (the status is the number after the request line):

203.0.113.7 - - [10/Sep/2026:10:12:01 +0000] "GET /api/users/999 HTTP/1.1" 404 153 "-" "Mozilla/5.0"

Check it with curl

-i prints the status line and headers, and -w '%{http_code}' prints only the number, which is handy in scripts and health checks. Replace the URL with yours:

curl -sS -o /dev/null -w '%{http_code} %{time_total}s\n' https://example.com/api/orders

Compare what curl sees with what the browser sees. A different status from the same URL usually means a cache, a CDN edge or a cookie is in the way.

Investigating a run of 404s? Paste the log excerpt into Log Share to get line numbers, highlighting and an expiring link for whoever is on call with you.

  • 410Gone: The resource existed and has been permanently removed.
  • 403Forbidden: The server understood the request and refuses to authorise it.
  • 400Bad Request: The server could not understand the request because it is malformed.
  • 405Method Not Allowed: The URL exists but does not accept this HTTP method.

FAQ

Do 404 errors hurt SEO?

Not by themselves; every site has some. Pages you link to internally that return 404 waste crawl budget and user trust, so fix or redirect those.

404 or 410 for deleted content?

410 tells crawlers the removal is deliberate and permanent, so they drop the URL faster. 404 is fine when you do not know or do not care.