What 404 Not Found means
404 Not Found means the server could not find a current representation for the target resource. It does not say whether the resource never existed or was removed; the distinction is usually hidden on purpose.
When a server should return it
- A requested path does not match any route.
- A database lookup returns no row for the given ID.
- A static file was moved or the deployment missed it.
- A parent resource does not exist, making the child path meaningless.
Example response
HTTP/1.1 404 Not Found
Content-Type: application/problem+json
{"title": "Not Found", "status": 404, "detail": "project 8f2c not found"}Why you might see it unexpectedly
- A base path mismatch after deploying under a subdirectory.
- Case sensitivity:
/Usersvs/userson a Linux server. - A trailing slash redirect that points to a non-existent canonical URL.
- Client-side routing swallowing the path before the server sees it.
- A CDN caching a 404 from a previous deploy.
Related status codes
410 Gone means removed permanently and intentionally. 403 Forbidden may hide existence too. 301 Moved Permanently handles moved resources.