toolfree

404 Not Found

What a 404 actually means, why it is not the same as 410, and what to check when you get one you did not expect.

Runs in your browser

Click a code to copy it.

4xx · Client error

The request was wrong, or not allowed. Changing the request may help.

CodeMeaning
Bad RequestThe server could not understand the request at all.
UnauthorizedYou are not authenticated. The server does not know who you are.Misnamed: 401 means unauthenticated. 403 is the one that means unauthorised. A 401 must carry a `WWW-Authenticate` header.
ForbiddenThe server knows who you are and you still may not have this.Logging in will not help. If the existence of the resource is itself secret, 404 is the safer answer.
Not FoundThere is nothing at this address.Says nothing about whether it ever existed. Use 410 when you know it is gone for good.
Method Not AllowedThe address exists but not for this verb. The reply must list the ones that work.
ConflictThe request clashes with the current state — an edit against a newer version, for example.
GoneIt existed and has been deliberately removed. It is not coming back.
I'm a teapotAn April Fools joke from 1998 that never left.
Unprocessable ContentWell-formed, but semantically wrong — valid JSON with an invalid field.
Too Many RequestsYou are being rate limited. `Retry-After` says when to come back.

What it actually says

A 404 says one thing: there is nothing at this address.

It deliberately says nothing about whether there ever was, whether there might be later, or whether you would be allowed to see it if there were. That vagueness is a feature — it is what lets a server hide the existence of something without admitting that it is hiding anything.

404 or 410

If you know the thing existed and has been removed on purpose, 410 Gone is the better answer. It is a stronger statement: not “I cannot find this” but “this is deliberately gone.”

The practical difference is crawling. Search engines treat a 404 as possibly temporary and will come back for a while; a 410 tells them to stop, and pages drop out of the index faster. If you are retiring URLs on purpose, 410 does what you mean.

Use 404 when you genuinely do not know — which is most of the time, because most servers cannot distinguish “never existed” from “deleted last year”.

When you did not expect one

In rough order of how often it turns out to be the cause:

404 pages should still be 404

A custom error page is good. Serving it with a 200 status is not — that is a “soft 404”, and it tells every crawler that a page full of “not found” is real content worth indexing. Set the status as well as the page.

Keep the page useful: a search box and a link to the section the URL was in beats an apology.