HTTP 404 Not Found
The server cannot find the requested resource.
4xx Client Error
404
Not Found
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 status code does not indicate whether this lack of representation is temporary or permanent; the 410 Gone status code is preferred if the origin server knows, presumably through some configurable means, that the condition is likely to be permanent. A 404 response is cacheable by default unless otherwise indicated by the response cache-control or expires headers. This is probably the most well-known HTTP status code, familiar even to non-technical internet users.
When Is It Used?
Returned when the requested page, endpoint, or resource does not exist. Common when a URL is mistyped, a page has been deleted without a redirect, an API endpoint path is incorrect, or a resource ID does not exist in the database.
Example Response
HTTP/1.1 404 Not Found
Content-Type: application/json
{"error": "not_found", "message": "The requested resource /api/users/999 was not found"}