404 Not Found
The server cannot find anything at this URL. The page may have moved or been deleted, or the link may have a typo.
What 404 Not Found means
404 is the most familiar error on the web. The server is up and working, but nothing exists at the requested path, and the code does not say whether that is temporary or permanent.
If you know the page is gone for good, 410 Gone is more precise. Servers may also return 404 instead of 403 to hide a resource from people who should not see it.
A page that says "not found" but returns 200 is a soft 404. Google Search Console flags these, so make sure your error page sends a real 404 status.
Common causes
- A typo in the URL or a broken link on another page.
- The page was deleted or moved without a redirect, often after a redesign or CMS change.
- Case or trailing slash mismatches, such as /About instead of /about.
- Missing rewrite rules, such as a single-page app that needs every path served by index.html.
How to fix 404 Not Found
- As a visitor, check the URL, try the site's search or home page, or look for an archived copy.
- Redirect moved pages to their new URL with a 301.
- Find broken links with Google Search Console or a site crawler and fix them at the source.
- Serve a helpful custom 404 page that still returns the 404 status code.
Example response
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
404 Not FoundHow to check for a 404 response
cURL
# Print only the status code
curl -s -o /dev/null -w "%{http_code}\n" https://example.com/JavaScript (Node.js)
const res = await fetch("https://example.com/");
if (res.status === 404) {
console.log(res.status, res.statusText);
}Python
import requests
res = requests.get("https://example.com/")
if res.status_code == 404:
print(res.status_code, res.reason)Go
res, err := http.Get("https://example.com/")
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
if res.StatusCode == 404 {
fmt.Println(res.Status)
}Specification
404 Not Found is defined in RFC 9110, section 15.5.5.
Related status codes
- 410
The resource used to exist here but was deliberately removed and will not come back. There is no forwarding address.
- 301
The page has moved to a new URL for good. Browsers and search engines follow the Location header and update their links.
- 403
The server understood the request but refuses to allow it. Logging in again will not help unless your account gets access.