Status codes · one code404Not Found

What a 404 Not Found response means, who is at fault, what a visitor should do and what the server owner should do.

Open the reference on this code
What is happening

One page does not open while the site works

HTTP/1.1 404 Not Found

The address exists as a link but nothing lives at it: the page was deleted, renamed, or the link has a typo. A separate case is a server answering 200 while showing «page not found» text: to a search engine that is an ordinary page, it keeps crawling it and files it as a «soft 404». That answer is worse than an honest 404.

Code
Who is at faultClient error
Class4xx Client error
01

What to do

If it is someone else's site

Check the address character by character: a stray trailing slash, a Cyrillic letter in place of a Latin one, a link broken across lines in an email. If the address is right, the page is gone; use the site search rather than guessing addresses.

If it is your server

If a page is gone for good, answer 410 rather than 404: search engines stop returning to such an address noticeably sooner. If it moved, use a 301 to its new address — that address specifically, not the home page: a blanket redirect counts as a soft 404 and does the same harm. And check separately that your own 404 page really answers with a 404 rather than a 200 with pretty text.

02

Easily confused with

410Gone

«gone for good, deliberately» — the same meaning to a human, a stronger signal to a crawler.

410
403Forbidden

the resource exists but access is closed. Sometimes a 404 is returned instead of a 403 on purpose.

403
301Moved Permanently

the address did not vanish, it changed: then it needs a redirect rather than a 404.

301
03

How to check

curl -sI https://example.com/page | head -1

what the code actually is — the page itself will not tell you

awk '$9==404 {print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head

which addresses return 404 most often: that is usually where the broken link is

Find another code

The reference holds sixty-four codes searchable by number, name and meaning — plus a breakdown of confusing pairs such as 401 and 403.

Open the reference on this codeAll codes

Updated

«» added to favorites