404 Not Found
The server has no representation for this URL and will not say whether it ever did. The most common status code on the web after 200.
At a glance
- Status code
- 404 Not Found
- Class
- 4xx, client error, the request itself is the problem
- Defined in
- RFC 9110
- Cacheable by default
- yes
- Response body
- Usually an error page or a JSON error object.
In detail
404 makes no promise about the future or the past. The resource may have never existed, may exist later, or may be hidden deliberately. That vagueness is intentional.
Correct for a missing resource. Not correct for an empty collection, which is a 200 with an empty list, and not correct for a valid URL the caller may not see, which is 403 unless you are hiding existence on purpose.
For a page that used to exist and has moved, return 301 to the new URL instead. A 404 discards whatever ranking and inbound links the old URL had.
Examples
HTTP/1.1 404 Not Found
Content-Type: text/html
Cache-Control: max-age=300
<h1>Not found</h1>Things that catch people out
- A soft 404 is a page that says not found in the body while returning 200. Search engines treat it as a quality problem and clients cannot detect it at all.
- 404 is cacheable by default. Deploying a fix does not clear the 404 already stored in a CDN.
- 410 says the resource is gone permanently, which removes it from search indexes faster than 404 does.
Try it: HTTP Request Builder
Build a request with any method, headers and body, send it, and read the status line the server returns.
HTTP Request Builder
LOCAL · Browser-OnlyBuild and test HTTP requests with custom headers and body
Authentication
Headers
Generate Code
curl -X GET 'https://api.example.com/endpoint' \
-H 'Content-Type: application/json'Showing a sample URL. Enter your endpoint above to update the snippet.
Related HTTP status codes
All http status codes →410 Gone
The resource existed and has been permanently removed with no forwarding address. Stronger and more useful than 404 when you know the removal is final.
301 Moved Permanently
The resource has a new permanent URL, given in Location. Search engines transfer ranking signals to the target and clients may cache the redirect.
403 Forbidden
The server understood the request and refuses to fulfil it. Unlike 401, sending different credentials will not help.
405 Method Not Allowed
The URL exists but does not support the method you used. The Allow header lists the methods it does support.
406 Not Acceptable
The server cannot produce a representation that matches the Accept headers the client sent.
407 Proxy Authentication Required
A proxy between the client and the server needs credentials. This is 401 raised by the intermediary rather than by the origin.
Tools for this
- HTTP Request Builder Free online HTTP request builder - build and test HTTP requests with custom headers and body
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL