404 Not Found

The server is reachable and speaks HTTP, but nothing lives at this URL. Beyond the obvious typo case, 404 is also used deliberately to hide resources the caller shouldn't know exist — GitHub returns 404 for private repos you can't see.

What usually causes it

  • Wrong path: typos, missing prefixes (/api/v1 vs /api), trailing-slash strictness
  • Environment mix-ups (calling prod paths against staging)
  • Deleted or renamed resources with no redirect
  • Deployment issues: SPA fallback not configured, so client-side routes 404 on refresh

How to debug and fix it

  1. curl -i the exact URL; compare with the documented path character by character (case sensitivity included).
  2. For 'works in dev, 404 in prod': check base paths, rewrites, and that the deployment actually contains the route.
  3. SPA refresh 404s need the server to serve index.html for unknown paths (historyApiFallback / try_files).
  4. For removed content, serve 410 if permanently gone, or 301 to the successor — bare 404s bleed SEO equity.

Easily confused with