Not Found
ActiveHTTP 404 Not Found indicates the server cannot find the requested resource. Defined in RFC 9110 §15.5.5. The most recognizable HTTP error code. Does not indicate whether the absence is temporary or permanent.
Description
The 404 Not Found status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
A 404 does not indicate whether the condition is temporary or permanent — if the server knows the resource is permanently gone, it should use 410 Gone instead.
The 404 response is cacheable by default unless otherwise indicated by cache controls.
Examples
GET /api/users/99999 HTTP/1.1
Host: api.example.comHTTP/1.1 404 Not Found
Content-Type: application/json
{"error": "not_found", "message": "User with ID 99999 does not exist"}Edge Cases
- •Some servers return 404 to hide resource existence for security (instead of 403).
- •A 404 on an API collection endpoint (GET /users) is unusual — an empty array with 200 is more appropriate.
- •Soft-deleted resources: consider 410 Gone if the deletion is permanent and known.
- •Search engines treat persistent 404s as a signal to remove the page from the index.
When You'll See This
- →URL typed incorrectly
- →Resource was deleted without a redirect
- →Broken link from another website
- →API entity does not exist
Implementation References
| Language | Constant |
|---|---|
| Go | http.StatusNotFound |
| Rust | http::StatusCode::NOT_FOUND |
| Python | http.HTTPStatus.NOT_FOUND |
| Node.js | http.STATUS_CODES[404] |
| .NET | HttpStatusCode.NotFound |
| Java | HttpURLConnection.HTTP_NOT_FOUND |
History
Present since HTTP/0.9 (1991). The most culturally recognized HTTP status code. Many websites have creative custom 404 pages.
Related Status Codes
FAQ
What does HTTP 404 Not Found mean?
HTTP 404 means the server cannot find the requested resource. The URL may be wrong, the resource may have been deleted, or it may never have existed.
What is the difference between 404 and 410?
404 means 'not found' (might come back). 410 means 'gone' (permanently deleted, won't return). Search engines drop 410 pages from their index faster.