HTTP Status Codes

Code Name What it means
100 Continue The server got the request headers and is waiting for the body.
101 Switching Protocols The client asked to switch protocols, usually to WebSocket.
200 OK The standard answer when everything worked.
201 Created A new resource was created, typically after a POST.
202 Accepted The request was taken but processing is not finished.
204 No Content It worked and there is deliberately no body to return.
206 Partial Content Only part of the resource is returned, used for range requests.
301 Moved Permanently The page has a new address for good, and search engines should follow it.
302 Found A temporary detour. The original address stays the real one.
303 See Other After a form post, look at another URL with a GET instead.
304 Not Modified The cached copy is still good, so nothing is sent again.
307 Temporary Redirect Like 302, but the request method and body are kept.
308 Permanent Redirect Like 301, but the method is kept. Use it for https upgrades of POST endpoints.
400 Bad Request The server cannot understand the request, often a malformed parameter.
401 Unauthorized You are not logged in, or the token is missing or expired.
403 Forbidden The server knows who you are and still refuses.
404 Not Found Nothing lives at this address. The most familiar error on the web.
405 Method Not Allowed The URL exists but not for this method, e.g. POST to a read-only endpoint.
408 Request Timeout The client took too long to finish sending the request.
409 Conflict The request clashes with the current state, such as a duplicate name.
410 Gone The resource was here and has been removed on purpose.
413 Payload Too Large The uploaded body is bigger than the server allows.
414 URI Too Long The URL itself is longer than the server accepts.
415 Unsupported Media Type The Content-Type is not one this endpoint accepts.
418 I'm a teapot An April Fools' joke from 1998 that never quite died.
422 Unprocessable Entity The request is well formed but the values fail validation.
429 Too Many Requests You hit the rate limit and should slow down.
451 Unavailable For Legal Reasons Blocked for legal reasons, not technical ones.
500 Internal Server Error Something broke on the server. The request itself was probably fine.
501 Not Implemented The server does not support this feature at all.
502 Bad Gateway A proxy got an invalid answer from the server behind it.
503 Service Unavailable Temporarily overloaded or under maintenance. Retry later.
504 Gateway Timeout The proxy waited for the backend and gave up.
505 HTTP Version Not Supported The server cannot speak the HTTP version used.

About HTTP Status Codes

A status code is the server's one-line answer, three digits, and the first digit sets the family. 1xx means information, 2xx means success, 3xx means go somewhere else, 4xx means the request had a problem, and 5xx means the server did.

Telling 4xx from 5xx saves time. A 404 or a 403 is usually something to fix on your side. A 502 or 504 is a reason to check with whoever runs the server, or simply wait. 401 and 403 get mixed up a lot: 401 means you have not proved who you are, 403 means you did and it still is not allowed.

The table below covers 35 codes with both names and a plain explanation. Filter by family or search for a number. Yes, 418 is in there too.

Frequently asked questions

Should I use 301 or 302?

301 when the move is permanent and you want search engines to transfer ranking to the new address. 302 when it is a temporary detour. HTTPS upgrades and domain changes are almost always 301.

Is 304 an error?

No, it is the most economical kind of success. The browser asks with a cache validator, the server says nothing changed, and the body is not sent again.

What is the difference between 502 and 504?

502 means the gateway got an invalid response from the backend, which may be down. 504 means the gateway waited for the backend and gave up because it was too slow.

Why do some 404 pages return 200?

That is a misconfiguration. A missing page should answer with 404, otherwise search engines will happily index it as a normal page.

Related tools

Network View all ›