Skip to the content

HTTP Status Codes

Look up what 301, 404, 503 and the other HTTP status codes mean.

71 codes

1xx Informational

An interim answer: the request has arrived and the final response is still to come.

  • 100 Continue

    RFC 9110

    The server has seen the request headers and the client can go ahead and send the body. It is only sent when the request asked for it with Expect: 100-continue, which some clients do before a large upload. More about 100

  • 101 Switching Protocols

    RFC 9110

    The server agrees to change to the protocol named in the Upgrade header on this connection. You see it at the start of every WebSocket connection. More about 101

  • 102 Processing

    RFC 2518 (WebDAV)

    A WebDAV server is still busy with a long request and says so to keep the client from giving up. Rare: the code was dropped when the WebDAV standard was revised. More about 102

  • 103 Early Hints

    RFC 8297

    Sent ahead of the real response with Link headers, so the browser can start loading stylesheets and scripts while the server is still putting the page together. More about 103

2xx Successful

The request was received, understood and accepted.

  • 200 OK

    RFC 9110

    The request succeeded. What comes back depends on the method: the resource itself for a GET, the result of the action for a POST. More about 200

  • 201 Created

    RFC 9110

    The request made a new resource, usually after a POST or a PUT. The Location header normally says where to find it. More about 201

  • 202 Accepted

    RFC 9110

    The request has been taken on, but the work isn't done yet and may still fail. Common for jobs that are put in a queue and processed in the background. More about 202

  • 203 Non-Authoritative Information

    RFC 9110

    The request succeeded, but a proxy on the way changed the response from what the origin server sent. Seldom seen. More about 203

  • 204 No Content

    RFC 9110

    The request succeeded and there is nothing to send back. Typical for a DELETE, or for a save after which the page doesn't have to change. More about 204

  • 205 Reset Content

    RFC 9110

    The request succeeded and the client should reset the view it came from, for example clear a form for the next entry. Rarely used. More about 205

  • 206 Partial Content

    RFC 9110

    The response holds only the part of the resource that the Range header asked for. This is how downloads are resumed and how a video player jumps to a position. More about 206

  • 207 Multi-Status

    RFC 4918 (WebDAV)

    A WebDAV response that reports on several resources at once. The body is XML with a separate status for each of them. More about 207

  • 208 Already Reported

    RFC 5842 (WebDAV)

    Used inside a WebDAV 207 response: the members of this collection were listed earlier in the same response and are not repeated. More about 208

  • 226 IM Used

    RFC 3229

    The response is the result of one or more instance manipulations applied to the resource, such as a delta against a version the client already has. Rarely implemented. More about 226

3xx Redirection

The client has to take another step to finish the request, usually fetching a different address.

  • 300 Multiple Choices

    RFC 9110

    The resource exists in more than one form, such as several languages or formats, and the client or the user should pick one. Servers rarely send it. More about 300

  • 301 Moved Permanently

    RFC 9110

    The resource has a new address for good, given in the Location header, and browsers and search engines remember the move. A client is allowed to turn a POST into a GET when it follows this redirect. More about 301

  • 302 Found

    also known as Moved TemporarilyRFC 9110

    The resource is at another address for now, so clients should keep using the original one. As with 301, a POST may be turned into a GET, which is why 303 and 307 were added. More about 302

  • 303 See Other

    RFC 9110

    The result of this request can be fetched with a GET from the address in the Location header. It is the usual answer to a submitted form, so that reloading the page doesn't send the form again. More about 303

  • 304 Not Modified

    RFC 9110

    The copy the client already has is still up to date, so no body is sent. It answers a conditional request made with If-None-Match or If-Modified-Since. More about 304

  • 307 Temporary Redirect

    RFC 9110

    Like 302, but the client has to repeat the request with the same method and body. A POST stays a POST. More about 307

  • 308 Permanent Redirect

    RFC 9110

    Like 301, but the method and body must not change. A POST stays a POST. More about 308

4xx Client error

The request is the problem: a wrong address, missing credentials, data the server can't accept.

  • 400 Bad Request

    RFC 9110

    The server can't make sense of the request: broken syntax, invalid JSON, a required parameter that is missing. The client has to change the request before trying again. More about 400

  • 401 Unauthorized

    RFC 9110

    The request has no valid credentials: you are not logged in, or the token is wrong or has expired. Despite its name it is about authentication, and the WWW-Authenticate header in the response says how to authenticate. More about 401

  • 402 Payment Required

    RFC 9110

    Reserved for future use since the early days of HTTP and never worked out further. Some APIs send it for a failed payment or a used-up quota. More about 402

  • 403 Forbidden

    RFC 9110

    The server understood the request and refuses it. Logging in again won't help: this account, address or request is not allowed to do this. More about 403

  • 404 Not Found

    RFC 9110

    There is nothing at this address, or the server doesn't want to reveal that there is. It says nothing about whether the resource ever existed or will come back. More about 404

  • 405 Method Not Allowed

    RFC 9110

    The address exists but doesn't take this method, such as a POST to something that can only be read. The Allow header lists the methods that do work. More about 405

  • 406 Not Acceptable

    RFC 9110

    The server can't produce a response in any of the formats, languages or encodings that the Accept headers of the request ask for. More about 406

  • 407 Proxy Authentication Required

    RFC 9110

    Like 401, but it is a proxy between you and the server that wants credentials. It says how in a Proxy-Authenticate header. More about 407

  • 408 Request Timeout

    RFC 9110

    The server gave up waiting for the client to finish sending the request and is closing the connection. The client can try again on a new one. More about 408

  • 409 Conflict

    RFC 9110

    The request clashes with the current state of the resource: an edit based on an outdated version, or creating something that already exists. More about 409

  • 410 Gone

    RFC 9110

    The resource was here and has been removed on purpose, for good. That is a stronger statement than 404: clients and search engines should drop their links to it. More about 410

  • 411 Length Required

    RFC 9110

    The server insists on a Content-Length header and the request came without one. More about 411

  • 412 Precondition Failed

    RFC 9110

    A condition in the request headers, such as If-Match or If-Unmodified-Since, turned out to be false. Usually the resource changed after the client fetched it, and the update is refused so that nobody's changes get overwritten. More about 412

  • 413 Content Too Large

    also known as Payload Too Large, Request Entity Too LargeRFC 9110

    The body of the request is bigger than the server accepts, a classic with file uploads. The limit is a server setting, such as client_max_body_size in nginx. More about 413

  • 414 URI Too Long

    also known as Request-URI Too LongRFC 9110

    The address is longer than the server is willing to handle. Usually too much data was put in the query string, or a redirect loop keeps adding to the URL. More about 414

  • 415 Unsupported Media Type

    RFC 9110

    The server doesn't accept the format of the request body, going by its Content-Type or Content-Encoding. A common cause is posting JSON without the header Content-Type: application/json. More about 415

  • 416 Range Not Satisfiable

    also known as Requested Range Not SatisfiableRFC 9110

    The Range header asks for a part of the resource that doesn't exist, for example bytes beyond the end of the file. More about 416

  • 417 Expectation Failed

    RFC 9110

    The server can't meet what the Expect header of the request asks. In practice: it won't deal with Expect: 100-continue. More about 417

  • 418 (Unused)

    also known as I'm a teapotRFC 9110

    An April Fools' joke from 1998 (RFC 2324): the answer of a teapot that is asked to brew coffee. It was never part of HTTP, but so much software implements it that the number is kept reserved. More about 418

  • 421 Misdirected Request

    RFC 9110

    The request reached a server that isn't set up to answer for this host name. It happens when an HTTP/2 connection is reused for another site that shares the certificate; the client can retry on a new connection. More about 421

  • 422 Unprocessable Content

    also known as Unprocessable EntityRFC 9110

    The request is well-formed, but what it says can't be carried out: a required field is empty, a date lies in the past. Many APIs use it for validation errors. More about 422

  • 423 Locked

    RFC 4918 (WebDAV)

    WebDAV: the resource is locked and can't be changed until the lock is released. More about 423

  • 424 Failed Dependency

    RFC 4918 (WebDAV)

    WebDAV: this action was not carried out because another action it depended on failed. More about 424

  • 425 Too Early

    RFC 8470

    The server won't risk processing a request that arrived as TLS early data, because an attacker could replay such a request. The client should send it again once the handshake is complete. More about 425

  • 426 Upgrade Required

    RFC 9110

    The server refuses the request over the current protocol and names the one it wants in an Upgrade header. More about 426

  • 428 Precondition Required

    RFC 6585

    The server only takes this request with a condition attached, such as an If-Match header. This guards against lost updates, where two clients overwrite each other's changes. More about 428

  • 429 Too Many Requests

    RFC 6585

    You have sent more requests than the rate limit allows. If there is a Retry-After header, it says how long to wait. More about 429

  • 431 Request Header Fields Too Large

    RFC 6585

    The headers of the request are too big, one of them or all together. Oversized cookies are the usual cause. More about 431

  • 451 Unavailable For Legal Reasons

    RFC 7725

    Access is denied for a legal reason, such as a court order or a government block. The number is a nod to the novel Fahrenheit 451. More about 451

5xx Server error

The request may have been fine, but the server failed to fulfil it.

  • 500 Internal Server Error

    RFC 9110

    Something went wrong on the server and no more specific code fits, usually an error in the application that wasn't handled. The details are in the server's logs. More about 500

  • 501 Not Implemented

    RFC 9110

    The server doesn't support what the request needs, typically a method it doesn't know at all. For a method that exists but isn't allowed on this resource, 405 is the right code. More about 501

  • 502 Bad Gateway

    RFC 9110

    A proxy or gateway got an invalid response from the server behind it. With a reverse proxy such as nginx it usually means the application has crashed or isn't listening. More about 502

  • 503 Service Unavailable

    RFC 9110

    The server can't handle the request right now because it is overloaded or down for maintenance. It is meant to be temporary, and a Retry-After header can say when to come back. More about 503

  • 504 Gateway Timeout

    RFC 9110

    A proxy or gateway waited too long for the server behind it. The application can be reached but is too slow, or is itself stuck waiting for a database or another service. More about 504

  • 505 HTTP Version Not Supported

    RFC 9110

    The server doesn't support the major version of HTTP that the request used. More about 505

  • 506 Variant Also Negotiates

    RFC 2295

    A configuration error in transparent content negotiation: the variant chosen for the request is itself set up to negotiate, which would go round in circles. Experimental and hardly ever seen. More about 506

  • 507 Insufficient Storage

    RFC 4918 (WebDAV)

    WebDAV: the server can't store what it needs to complete the request. Outside WebDAV it is sometimes used for a full disk or a storage quota that has been reached. More about 507

  • 508 Loop Detected

    RFC 5842 (WebDAV)

    WebDAV: the server ran into an endless loop while processing the request, for example a collection that contains itself. More about 508

  • 510 Not Extended

    RFC 2774

    The request lacked an HTTP extension that the server required. The experiment it belonged to has been retired, and the registry marks the code as obsolete. More about 510

  • 511 Network Authentication Required

    RFC 6585

    You have to sign in to the network before you get internet access. It comes from the captive portal of a hotel, airport or train Wi-Fi, not from the site you asked for. More about 511

Unofficial codes

Not in the IANA registry. These are made up by one piece of software and mean nothing outside it, but they turn up in logs and on error pages often enough.

  • 419 Page Expired

    Laravel

    Laravel's answer when the CSRF token of a form is missing or no longer valid, which happens when a page has been open for too long before the form is sent. More about 419

  • 444 No Response

    nginx

    Set in the nginx configuration with return 444: nginx closes the connection without sending anything. It only shows up in nginx's own access log, because the client gets no response at all. More about 444

  • 499 Client Closed Request

    nginx

    Written to the nginx access log when the client closed the connection before the server had answered: a visitor who navigated away, or a caller with a shorter timeout. It is never sent to anyone. More about 499

  • 520 Web Server Returns an Unknown Error

    Cloudflare

    Cloudflare got an empty, unknown or unexpected response from the origin server. More about 520

  • 521 Web Server Is Down

    Cloudflare

    The origin server refused Cloudflare's connection. The web server isn't running, or a firewall blocks Cloudflare's addresses. More about 521

  • 522 Connection Timed Out

    Cloudflare

    Cloudflare timed out while trying to connect to the origin server. An overloaded server or a firewall that drops Cloudflare's packets are common causes. More about 522

  • 523 Origin Is Unreachable

    Cloudflare

    Cloudflare could not contact the origin server at all, typically because there is no route to its address or the DNS records at Cloudflare point to the wrong one. More about 523

  • 524 A Timeout Occurred

    Cloudflare

    Cloudflare connected to the origin server, but the origin took too long to come back with a response. More about 524

  • 525 SSL Handshake Failed

    Cloudflare

    The TLS handshake between Cloudflare and the origin server failed. More about 525

  • 526 Invalid SSL Certificate

    Cloudflare

    Cloudflare could not validate the certificate of the origin server: it has expired, is self-signed or doesn't match the host name. This check applies when the SSL mode is Full (strict). More about 526

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

The first digit says most of it

ClassWhat it tells you
1xxHold on, the real response is still coming
2xxIt worked
3xxLook somewhere else, or use what you already have
4xxThe request was wrong, or not allowed
5xxThe request may have been fine, the server failed

A client that meets a code it doesn't know is supposed to treat it as the x00 of its class. An unfamiliar 4xx is handled as a 400, an unfamiliar 5xx as a 500.

The words after the number are for people only. HTTP/2 and HTTP/3 don't send them at all, and a server may write anything it likes there, so software should go by the number. The names in this list are the ones in the IANA registry, which is the official record of who defined what.

Every code has a page of its own with the causes, what to do and the codes it gets mixed up with, linked from its entry in the list. To point someone at a place in the list itself, click a number, or add it to the address of this page as #404.

301, 302, 307 or 308

Two questions decide which redirect you want. Is the move permanent? And must the method stay the same?

Client may turn POST into GETMethod and body are kept
Permanent301308
Temporary302307

301 and 302 are the old pair. Browsers took to following them with a GET even when the original request was a POST, and the standard ended up allowing that. 307 and 308 were added to rule it out. For an ordinary page that has moved, a 301 is fine. An API that redirects a POST needs 307 or 308, or the request arrives as a GET without its body. 303 is the deliberate version of the old habit: "it worked, now GET this other page", the answer to a submitted form.

Be careful with permanent. Browsers cache a 301 or 308 and go straight to the new address from then on, without asking the server again. A wrong one is hard to take back. Use 302 or 307 until you are sure.

401 or 403

401 means the server doesn't know who you are: there were no credentials, or they were not valid. Logging in can fix it. 403 means the server refuses anyway, and authenticating again will not help. The name of 401, Unauthorized, is unfortunate, because it is about authentication (who you are) while 403 is the one about authorisation (what you may do).

Some servers answer 404 where 403 would be true, so that an outsider can't tell whether the thing exists.

404 or 410

404 makes no promise in either direction: there is nothing here now. A mistyped link gets a 404. 410 says that something was here and has been taken away for good. Send it for content you removed on purpose, so that crawlers and other sites know they can stop asking.

502, 503 or 504

All three tend to come from the proxy, load balancer or CDN in front of an application, not from the application.

  • 502 Bad Gateway: the proxy tried the application and got an invalid answer or none at all. Check whether the application is running and listening where the proxy expects it.
  • 504 Gateway Timeout: the application was reached but did not answer in time. Look for slow queries, or a timeout on the proxy that is shorter than the work takes.
  • 503 Service Unavailable: the server is declining requests for now: it is overloaded, in maintenance, or a load balancer has no healthy machine to send the request to.
See all 12