HTTP Status Codes

Complete reference of HTTP status codes with meanings and use cases.

Every HTTP status code in the IANA registry, from 100 Continue to 511 Network Authentication Required, with what each one means and when servers send it. Search by number or by word, such as "redirect", "timeout" or "429". Codes are grouped by their first digit: 1xx informational, 2xx success, 3xx redirection, 4xx client errors and 5xx server errors. Common unofficial codes from nginx and Cloudflare, such as 499 and 522, are included and labelled, because you'll meet them in logs even though they aren't in the standard (RFC 9110).

1xx Informational

100ContinueThe server got the request headers; the client should send the body. Used with Expect: 100-continue.
101Switching ProtocolsThe server is switching protocols as requested in the Upgrade header, e.g. to WebSocket.
102ProcessingWebDAV: the server accepted the request but hasn't finished. Deprecated.
103Early HintsSends Link headers early so the browser can preload resources while the server prepares the response.

2xx Success

200OKThe request succeeded. The body depends on the method: the resource for GET, the result for POST.
201CreatedA new resource was created. The Location header usually points to it.
202AcceptedThe request was accepted for processing but hasn't completed, e.g. a queued background job.
203Non-Authoritative InformationThe response was modified by a proxy from the origin's 200 response.
204No ContentSuccess with no body. Common for DELETE and for PUT/PATCH that don't return the resource.
205Reset ContentSuccess; the client should reset the document view, e.g. clear a form.
206Partial ContentReturns part of the resource in answer to a Range request (resumable downloads, video seeking).
207Multi-StatusWebDAV: the body holds separate status codes for several sub-requests.
208Already ReportedWebDAV: members of a binding already listed earlier in the response.
226IM UsedThe response is the result of instance manipulations (delta encoding).

3xx Redirection

300Multiple ChoicesSeveral representations are available and the client should choose one. Rarely used.
301Moved PermanentlyThe resource has a new permanent URL (in Location). Search engines transfer ranking to the new URL. Clients may change POST to GET.
302FoundTemporary redirect to the URL in Location. Clients may change POST to GET; use 307 to keep the method.
303See OtherRedirect the client to fetch another URL with GET, typically after a form POST.
304Not ModifiedThe cached copy is still valid (answer to If-None-Match or If-Modified-Since). No body.
305Use ProxyDeprecated for security reasons; don't use.
307Temporary RedirectTemporary redirect that keeps the method and body (a POST stays a POST).
308Permanent RedirectPermanent redirect that keeps the method and body. The method-preserving version of 301.

4xx Client error

400Bad RequestThe server can't process the request because of a client error: malformed syntax, invalid JSON, bad parameters.
401UnauthorizedAuthentication is required or failed. Really means “unauthenticated”; the response must include WWW-Authenticate.
402Payment RequiredReserved; some APIs use it when a plan's quota or payment has lapsed.
403ForbiddenThe server understood who you are but refuses access. Logging in again won't help.
404Not FoundNo resource at this URL. May also hide a resource the client isn't allowed to know about.
405Method Not AllowedThe URL exists but doesn't support this method. The Allow header lists the methods it does support.
406Not AcceptableNo representation matches the Accept headers the client sent.
407Proxy Authentication RequiredLike 401, but the proxy between client and server needs credentials.
408Request TimeoutThe client took too long to send the request; the server closed the connection.
409ConflictThe request conflicts with the current state, e.g. an edit conflict or a duplicate unique key.
410GoneThe resource was removed permanently and won't come back. Search engines drop it faster than a 404.
411Length RequiredThe server needs a Content-Length header.
412Precondition FailedA conditional header (If-Match, If-Unmodified-Since) didn't match; used for optimistic locking.
413Content Too LargeThe request body is bigger than the server allows (formerly “Payload Too Large”).
414URI Too LongThe URL is longer than the server will handle, often from a GET with a huge query string.
415Unsupported Media TypeThe server doesn't accept the request body's Content-Type.
416Range Not SatisfiableThe requested Range is outside the size of the resource.
417Expectation FailedThe server can't meet the Expect header's requirement.
418I'm a teapotAn April Fools' joke from the Hyper Text Coffee Pot Control Protocol. Reserved so it isn't reused.
421Misdirected RequestThe request reached a server that can't produce a response for this host (common with HTTP/2 connection reuse).
422Unprocessable ContentThe syntax is valid but the content fails validation, e.g. a missing required field. Common in REST APIs.
423LockedWebDAV: the resource is locked.
424Failed DependencyWebDAV: the request failed because a previous request failed.
425Too EarlyThe server won't process a request that might be replayed (TLS 1.3 early data).
426Upgrade RequiredThe client must switch to another protocol, given in the Upgrade header.
428Precondition RequiredThe server requires a conditional request (If-Match) to prevent lost updates.
429Too Many RequestsRate limit exceeded. Retry-After says how long to wait.
431Request Header Fields Too LargeHeaders are too big, often because of oversized cookies.
444No ResponseUnofficial · nginxnginx closed the connection without sending anything, usually to drop unwanted requests.
451Unavailable For Legal ReasonsAccess is blocked for legal reasons, such as a court order or government censorship.
499Client Closed RequestUnofficial · nginxnginx logs this when the client disconnected before the server answered.

5xx Server error

500Internal Server ErrorA generic server-side failure, such as an unhandled exception. Check the server logs.
501Not ImplementedThe server doesn't support the functionality needed, e.g. an unknown method.
502Bad GatewayA gateway or proxy got an invalid response from the upstream server (it crashed or returned garbage).
503Service UnavailableThe server is overloaded or down for maintenance. Retry-After may say when to try again.
504Gateway TimeoutA gateway or proxy didn't get a response from the upstream server in time.
505HTTP Version Not SupportedThe server doesn't support the HTTP version used.
506Variant Also NegotiatesA content-negotiation configuration error on the server.
507Insufficient StorageWebDAV: the server can't store what's needed to complete the request.
508Loop DetectedWebDAV: the server found an infinite loop while processing.
510Not ExtendedFurther extensions to the request are required. Obsolete.
511Network Authentication RequiredYou need to sign in to the network, e.g. a hotel or airport Wi-Fi captive portal.
520Web Server Returned an Unknown ErrorUnofficial · CloudflareCloudflare got an empty or unexpected response from the origin server.
521Web Server Is DownUnofficial · CloudflareCloudflare couldn't connect to the origin server; it refused the connection.
522Connection Timed OutUnofficial · CloudflareCloudflare's connection to the origin server timed out.
523Origin Is UnreachableUnofficial · CloudflareCloudflare can't reach the origin, often because of a DNS or routing problem.
524A Timeout OccurredUnofficial · CloudflareCloudflare connected to the origin, but it didn't respond within 100 seconds.
525SSL Handshake FailedUnofficial · CloudflareCloudflare couldn't complete a TLS handshake with the origin.
526Invalid SSL CertificateUnofficial · CloudflareCloudflare couldn't validate the origin server's certificate (Full strict mode).

Source: IANA HTTP Status Code Registry; RFC 9110 (HTTP Semantics). Unofficial nginx and Cloudflare codes are labelled.

Common use cases

  • Work out what an error in a browser, log or API response means
  • Pick the right status code when building an API
  • Debug redirects, caching and authentication
  • Explain an outage or error page to someone non-technical

How to use

  1. Type a code or a keyword in the search box.
  2. Read the meaning and when it's used.
  3. Check the label for codes that are unofficial or specific to one server.

FAQ

What's the difference between 401 and 403?

401 Unauthorized means you aren't logged in, or your credentials are missing or invalid, so try again with them. 403 Forbidden means the server knows who you are but won't let you in, and logging in again won't help.

Should I use 301 or 302 for a redirect?

301 for a permanent move, so search engines move ranking to the new address; 302 for a temporary one. 308 and 307 are the same pair but guarantee the request method (such as POST) isn't changed.

What do 502, 503 and 504 mean?

All three point to a server problem rather than yours. 502 Bad Gateway: a proxy got a bad reply from the server behind it. 503 Service Unavailable: the server is overloaded or down for maintenance. 504 Gateway Timeout: the server behind the proxy took too long to answer.

What does 429 Too Many Requests mean?

You've hit a rate limit. Slow down and try again later; the response often has a Retry-After header saying how long to wait.