// http

HTTP Status Codes Cheatsheet

Every status code you'll see in real traffic — grouped by class, with the operational meaning instead of just the spec definition.

Updated

Status code reference

1xx informational • 2xx success • 3xx redirect • 4xx client error • 5xx server error

CodeNameMeaning
100ContinueClient should continue the request body.
101Switching ProtocolsServer is switching protocols (e.g. WebSocket upgrade).
103Early HintsPreload hints sent before the final response.
200OKStandard success.
201CreatedResource was created.
202AcceptedRequest accepted, processing async.
204No ContentSuccess, no body. Common for DELETE/PUT.
206Partial ContentRange request succeeded.
301Moved PermanentlyPermanent redirect. Cached aggressively.
302FoundTemporary redirect (legacy semantics).
304Not ModifiedCache is still valid. No body returned.
307Temporary RedirectLike 302 but preserves method.
308Permanent RedirectLike 301 but preserves method.
400Bad RequestMalformed request — client error.
401UnauthorizedAuthentication required or failed.
403ForbiddenAuthenticated but not allowed.
404Not FoundResource doesn't exist.
405Method Not AllowedMethod not supported on this resource.
408Request TimeoutClient took too long.
409ConflictRequest conflicts with current state.
410GoneResource permanently removed.
413Payload Too LargeBody exceeds server limit.
415Unsupported Media TypeContent-Type not accepted.
418I'm a TeapotRFC 2324 joke. Sometimes used for 'blocked' responses.
422Unprocessable EntityValidation error — common in JSON APIs.
429Too Many RequestsRate limited. Check Retry-After header.
500Internal Server ErrorGeneric server failure.
501Not ImplementedServer doesn't support the method.
502Bad GatewayUpstream returned an invalid response.
503Service UnavailableServer overloaded or in maintenance.
504Gateway TimeoutUpstream didn't respond in time.
507Insufficient StorageServer out of disk.
511Network Authentication RequiredCaptive portal — log in to network first.

FAQ

What's the difference between 401 and 403?
401 means you haven't authenticated (or your token is invalid). 403 means the server knows who you are but you're not allowed to do that action.
When should I use 301 vs 302?
301 (and 308) for permanent moves — search engines update their index. 302 (and 307) for temporary redirects, A/B tests, or maintenance pages.
What does 502 Bad Gateway actually mean?
Your reverse proxy (nginx, Cloudflare, ALB) reached the upstream server but got an invalid or no response. Check the upstream service health and timeouts.
Why do I see 499?
499 is an nginx-specific code meaning the client closed the connection before the server could respond. Common when users navigate away or with aggressive client timeouts.

Related