Developer Toolbox
4xx client errorCacheable by defaultCheck the exact URL

404 Not Found

The server found nothing at this URL, or doesn't want to say whether something is there. A 404 says nothing about whether the resource ever existed or might come back: 410 Gone is the code for "deleted on purpose".

Open URL Encoder Percent-encode a path segment.

Common causes

  • A typo or a difference in case: most servers treat /Users and /users as different paths.
  • A # or ? inside a path segment that should have been percent-encoded cuts the path short.
  • A trailing slash the router doesn't expect, or a missing version prefix (/v2/).
  • A single-page app served without a fallback, so reloading /settings asks the server for a file that isn't there.
  • The resource belongs to another account, and the API hides it rather than answering 403.
  • The deploy left the file out, or a CDN is still serving an old 404.

How to fix it

  • Copy the exact URL of the failing request from the Network tab in DevTools, not from your code: the bug is often in how the URL gets built.
  • Percent-encode each path segment on its own, not the whole URL at once, or the slashes get encoded too.
  • For a single-page app, answer unknown paths with index.html and let the client-side router decide.
  • If a URL worked before a deploy, purge it from the CDN: 404s are cacheable by default.
  • For pages removed on purpose, answer 410, or 301 to the closest replacement, so search engines drop or move them sooner.

404 or 410?

404 leaves the question open, so search engines keep checking back. 410 Gone says the removal was deliberate. Google treats the two almost the same today, but drops a 410 a little sooner.

Example

HTTP/1.1 404 Not Found
Content-Type: application/problem+json

{
  "title": "Not Found",
  "status": 404,
  "detail": "No order with id 81723."
}

Defined in RFC 9110, section 15.5.5.