Guides

10 min readUpdated

HTTP status codes: the full list, and who sends each one

Quick answer

HTTP status codes are the three-digit numbers a server puts at the start of every response to say how the request went: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error. The number does not say which machine wrote it. A 4xx or 5xx can come from the application, a reverse proxy, or a CDN or WAF in front of both, and some codes may be cached and replayed to other visitors.

01What are HTTP status codes?

Every HTTP response begins with a status code, an integer from 100 to 599 that describes the result of the request. In RFC 9110, the current definition of HTTP semantics, the first digit sets the class and the other two carry no category. The text after the number, such as Not Found, is only a recommended reason phrase. How requests and responses are structured is covered in what HTTP is; this page is the reference for the codes.

Clients do not have to know every code. The specification requires them to understand the class and to treat an unrecognised code as the x00 code of that class, so an unknown 471 is handled like a 400. A value outside 100 to 599 is invalid and should be treated as a server error.

  • 1xx Informational: an interim response, such as 100 Continue or 103 Early Hints, before the final one
  • 2xx Successful: the request was received, understood and accepted
  • 3xx Redirection: the client must take a further step, usually by following the Location header
  • 4xx Client error: the request was wrong or cannot be fulfilled as sent, so repeating it unchanged usually fails again
  • 5xx Server error: the server, or something in front of it, failed to handle a request that looked valid

02HTTP status codes list: meaning, sender and caching

The table covers the codes you will meet in practice. "Usually sent by" is the layer that most often writes the code on a typical site with a CDN or WAF, a reverse proxy and an application; any layer can technically send any code. "Cacheable by default" follows RFC 9110 and RFC 9111: those codes may be stored and reused without explicit freshness headers, while every other code needs Cache-Control or Expires before a cache may keep it.

CodeMeaningUsually sent byCacheable by defaultHeader to look for
100 ContinueGo ahead and send the request bodyOrigin or proxyNo (interim)Request had Expect: 100-continue
101 Switching ProtocolsProtocol change accepted, e.g. WebSocketOriginNo (interim)Upgrade
103 Early HintsPreload hints before the final responseOrigin or CDNNo (interim)Link
200 OKSuccessOrigin or a cacheYesAge, if a cache served it
201 CreatedA new resource was createdApplication (API)NoLocation
202 AcceptedQueued, not yet processedApplication (API)NoBody points to a status URL
204 No ContentSuccess, deliberately empty bodyOriginYesNo body at all
206 Partial ContentPart of a file, for a Range requestOrigin or a cacheYesContent-Range
301 Moved PermanentlyPermanent redirectOrigin or a CDN redirect ruleYesLocation
302 FoundTemporary redirectOrigin or applicationNoLocation
304 Not ModifiedThe cached copy is still validOrigin or a cacheRefreshes the stored copyETag or Last-Modified, no body
307 Temporary RedirectTemporary redirect, same methodOrigin, or the browser for HSTSNoLocation
308 Permanent RedirectPermanent redirect, same methodOrigin or a CDN redirect ruleYesLocation
400 Bad RequestMalformed or unacceptable requestAny layer, often a proxyNoServer names the layer
401 UnauthorizedMissing or rejected credentialsApplication or an auth proxyNoWWW-Authenticate (required)
403 ForbiddenUnderstood, but refusedOrigin, WAF or CDNNoBranded block page
404 Not FoundNothing at this URLOriginYesNone
405 Method Not AllowedMethod not supported for this URLOriginYesAllow (required)
407 Proxy Authentication RequiredA forward proxy wants credentialsCorporate or forward proxyNoProxy-Authenticate (required)
408 Request TimeoutRequest not completed in timeServer or proxyNoConnection: close
409 ConflictClashes with the resource's current stateApplicationNoNone
410 GoneRemoved on purpose, for goodOriginYesNone
413 Content Too LargeRequest body too bigProxy or originNoRetry-After, if temporary
414 URI Too LongURL too longProxy or originYesNone
422 Unprocessable ContentWell-formed, but fails validationApplication (API)NoNone
429 Too Many RequestsRate limit reachedRate limiter at the edge, proxy or appMust not be storedRetry-After (optional)
431 Request Header Fields Too LargeHeaders or cookies too bigRuntimes such as Node.js or GoMust not be storedNone
500 Internal Server ErrorUnhandled application errorApplicationNoNone
501 Not ImplementedMethod not supported at allOrigin or proxyYesNone
502 Bad GatewayInvalid or no answer from upstreamProxy or CDNNoServer of the proxy
503 Service UnavailableTemporarily unable to serveProxy or originNoRetry-After (optional)
504 Gateway TimeoutUpstream did not answer in timeProxy or CDNNoServer of the proxy

03How do you tell who generated a status code?

Find the author before debugging, because the same number means different things at different layers. A 403 from a web application firewall is a blocked request; a 403 from the application is a permission check. The Server header usually names the software that wrote the response, proxies add a Via header, CDNs add their own (Cloudflare adds CF-Ray, for example), and an Age header shows the response came out of a cache.

Then compare two requests: one through the public hostname, one straight to the origin with the same hostname and TLS server name. If only the first fails, the edge, or something between it and the origin, wrote the error.

The browser can produce a status too. A 301 it cached earlier is replayed without contacting the server, and on a site that uses HSTS the browser rewrites http:// to https:// before sending anything, which Chrome's developer tools show as a 307 Internal Redirect. Some failures carry no status code at all because no HTTP response arrived: this site can't be reached means DNS or the connection failed, ERR_SSL_PROTOCOL_ERROR means the TLS handshake failed, and ERR_TOO_MANY_REDIRECTS means a redirect loop.

Logs also show unregistered codes: nginx uses 444 to close a connection without a response and logs 499 when the client hung up first, and several CDNs define their own 5xx codes, such as the Cloudflare error codes 520 to 530.

Which layer answered? (replace example.com and 203.0.113.10 with your hostname and origin IP)
# through the CDN or proxy: the status line and the headers that name the author
curl -s -o /dev/null -D - https://example.com/page | grep -iE '^(HTTP|server|via|age|x-cache|cf-ray)'

# straight to the origin, with the same Host header and TLS server name
curl -s -o /dev/null -D - --resolve example.com:443:203.0.113.10 https://example.com/page | grep -iE '^(HTTP|server|via|age)'

04Which HTTP status codes can be cached?

A shared cache such as a CDN may store a response only when permitted. RFC 9111 allows it when the response carries explicit freshness (Cache-Control with max-age or s-maxage, or an Expires header), a public directive, or a status code defined as heuristically cacheable. In RFC 9110 those codes are 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414 and 501. Everything else, including 302, 307, 401, 403, 500 and 503, is stored only when headers explicitly allow it.

Heuristic freshness is a guess, and RFC 9111 suggests 10% of the time since Last-Modified as a typical setting. Worked example: a page last modified 10 days ago and sent with no Cache-Control may be treated as fresh for about a day, because 10% of 240 hours is 24 hours. That is how a 404 or 301 sent without cache headers can keep being served after you have fixed the page.

Four codes are never stored: RFC 6585 says responses with 428, 429, 431 and 511 must not be stored by a cache. And a shared cache must not reuse a response to a request that carried an Authorization header unless the response explicitly allows it, which matters for 401 errors behind a proxy.

052xx success codes: 200, 201, 202 and 204

200 OK is the ordinary success response; its body depends on the method.

201 Created means the request created at least one new resource, typically after a POST or PUT to an API. RFC 9110 identifies the new resource by the Location header or, if that is missing, by the request URL, so an API that answers 201 should send something like Location: /orders/1234 instead of leaving the client to guess.

202 Accepted means the request was queued but not yet processed, and it may still fail later. It suits slow work such as exports or video encoding: the server answers at once, and the body should describe the job and point to a status URL the client can poll. HTTP has no way to deliver the final status of a 202 afterwards, so that URL is the only channel.

204 No Content is success with a deliberately empty body, common for DELETE requests. 206 Partial Content answers a Range request, which is how video players fetch a file in pieces.

063xx redirects in brief

Five codes do most redirecting. 301 and 308 are permanent and cacheable by default; 302 and 307 are temporary; 303 sends the client to a different resource with GET, the usual answer after a form submission. 307 and 308 forbid the client from changing the request method, whereas for historical reasons a browser may turn a POST into a GET after a 301 or 302. Choosing between all five deserves its own comparison, and a redirect that points back at itself ends in too many redirects.

304 Not Modified is formally a redirect too, to the copy the client already holds: the client asked conditionally, with If-None-Match or If-Modified-Since, and the server confirms that its stored version is still valid.

07Which status codes should an API return?

Clients branch on the status code before they read the body, so choose the code that tells them what to do next.

For the body, RFC 9457 defines Problem Details, a standard JSON shape served as application/problem+json. Its members type, title, status, detail and instance give every error one format, and an API may add fields of its own.

SituationStatus codeWhat the client should do
Body is not valid JSON, or a required field is missing400 Bad RequestFix the request; resending it unchanged fails again
Well-formed, but fails validation rules422 Unprocessable ContentShow the field errors to the user
No token, or an expired or invalid one401 Unauthorized, with WWW-AuthenticateObtain or refresh credentials
Valid token without the needed permission403 ForbiddenDo not retry with the same token
Resource does not exist, or must stay hidden404 Not FoundCheck the identifier
Conflicting state, such as a version mismatch409 ConflictRe-read the resource, then retry
Client exceeded its quota429 Too Many Requests, with Retry-AfterWait, then retry with backoff
Unexpected failure inside the API500 Internal Server ErrorRetry later, only if the call is safe to repeat
Dependency down or capacity exhausted503 Service Unavailable, with Retry-AfterRetry after the stated delay
A Problem Details error response (RFC 9457)
HTTP/1.1 422 Unprocessable Content
Content-Type: application/problem+json

{
  "type": "https://example.com/problems/invalid-email",
  "title": "The email address is not valid",
  "status": 422,
  "detail": "'bob@' has no domain part",
  "instance": "/signups/7c1e"
}

08How do status codes affect search engines?

Google documents that its crawlers treat every 4xx code except 429 the same way, as content that does not exist, and that those codes have no effect on crawl rate. 5xx codes and 429 make the crawlers slow down for a while, and URLs that keep returning server errors are eventually dropped from the index. A 401 or 403 therefore cannot slow Googlebot down.

So an HTTP flood that exhausts the origin is a search problem too: crawlers see the 5xx responses it causes.

Questions

Frequently asked questions

They are the same numbers. HTTP status codes cover every response, including successes and redirects, and people say error codes when they mean the 4xx and 5xx classes. A 4xx code says the request was the problem, such as a wrong URL, missing credentials or too many requests. A 5xx code says the server, or something in front of it, failed to handle a request that looked valid.

Strictly none, because status codes belong to server responses. A browser can still replay a response it cached earlier, such as a 301, without asking the server again, and Chrome shows its own HSTS upgrade from http to https as a 307 Internal Redirect. Messages such as this site can't be reached mean no HTTP response arrived at all, so there is no status code to read.

201 Created means the request succeeded and created at least one new resource, typically after a POST to an API. The response should include a Location header with the address of the new resource; without one, the request URL is taken to identify it. The body usually describes or links to what was created, and a 201 is not cacheable by default.

Return 202 when the server has accepted the work but not finished it, for example a report export or a video that is processed in the background. The response should describe the job and give a URL the client can poll for progress. Return 200 or 201 only when the work is complete at the moment you answer, because HTTP cannot deliver the final status of a 202 later.

Codes such as 444, 499 or the 52x family some CDNs use are not registered with IANA and are not part of HTTP. They are conventions of particular products, and some only ever appear in logs. A client that receives an unknown code handles it as the x00 code of its class, so an unrecognised 5xx is treated like a 500. The vendor's documentation explains what they mean.

Sources

Sources and verification

The header checks were run with curl 7.88.1 against a public example host, and the Problem Details body was parsed with the json module of Python 3.11. Debian 12, October 2026.

  1. 01RFC 9110, HTTP Semantics, section 15: Status Codes · RFC Editor
  2. 02RFC 9111, HTTP Caching, section 4.2.2: Calculating Heuristic Freshness · RFC Editor
  3. 03RFC 6585, Additional HTTP Status Codes (428, 429, 431, 511) · RFC Editor
  4. 04Hypertext Transfer Protocol (HTTP) Status Code Registry · IANA
  5. 05RFC 9457, Problem Details for HTTP APIs · RFC Editor
  6. 06RFC 6797, HTTP Strict Transport Security, section 8.3 · RFC Editor
  7. 07How HTTP status codes affect Google's crawlers · Google Search Central
  8. 08Module ngx_http_rewrite_module: return (code 444) · nginx.org
  9. 09nginx source: ngx_http_request.h (codes 444 and 494 to 499) · nginx on GitHub
  10. 10Cloudflare HTTP headers (CF-Ray) · Cloudflare docs

Last updated