You are currently viewing HTTP Status Codes Cheat Sheet

HTTP Status Codes Cheat Sheet

1xx: Informational Responses

CodeNameDescription
100ContinueServer received headers; client can proceed with the request body.
101Switching ProtocolsServer agrees to switch protocols as requested.
102Processing (WebDAV)Server is processing a WebDAV request; no response available yet.
103Early Hints (RFC 8297)Used to return some response headers before the final HTTP message.

2xx: Success

CodeNameDescription
200OKRequest successful. Response content depends on the request method.
201CreatedNew resource created as a result of the request.
202AcceptedRequest accepted for processing, but not completed yet.
203Non-Authoritative InfoTransforming proxy is returning a modified version of the origin’s response.
204No ContentRequest processed successfully; no content to return.
205Reset ContentRequest processed successfully; requester should reset its document view.
206Partial ContentServer delivers only part of the resource due to a range header.
207Multi-Status (WebDAV)XML message with multiple response codes for WebDAV sub-requests.
208Already Reported (WebDAV)DAV binding members enumerated in a preceding part of the response.
226IM Used (RFC 3229)Server fulfilled a request, and the response is a representation of applied instance-manipulations.

3xx: Redirection

CodeNameDescription
300Multiple ChoicesMultiple options available for the resource; client may choose.
301Moved PermanentlyAll future requests should be directed to the given URI.
302FoundClient should look at another URL (historically “Moved Temporarily”).
303See OtherResponse can be found under another URI using the GET method.
304Not ModifiedResource not modified since specified by request headers.
305Use ProxyRequested resource available only through a proxy. Not widely supported.
307Temporary RedirectRequest should be repeated with another URI; method cannot be changed.
308Permanent RedirectAll future requests should be directed to the given URI. Method cannot change.

4xx: Client Errors

CodeNameDescription
400Bad RequestServer cannot process the request due to a client error.
401UnauthorizedAuthentication required, has failed, or not yet provided.
402Payment RequiredReserved for future use or to indicate payment issues. Not widely used.
403ForbiddenServer understood the request, but client lacks necessary permissions.
404Not FoundRequested resource could not be found.
405Method Not AllowedRequest method is not supported for the requested resource.
406Not AcceptableRequested resource produces content not acceptable according to headers.
407Proxy Authentication Req.Client must first authenticate with the proxy.
408Request TimeoutServer timed out waiting for the request.
409ConflictRequest could not be processed due to a conflict in the current resource state.
410GoneResource requested is no longer available and will not be available again.
411Length RequiredRequest did not specify the length of its content.
412Precondition FailedServer does not meet one of the preconditions specified in the request header.
413Payload Too LargeRequest is larger than the server is willing or able to process.
414URI Too LongURI provided was too long for the server to process.
415Unsupported Media TypeRequest entity has a media type not supported by the server or resource.
416Range Not SatisfiableClient has asked for a portion of the file that the server cannot supply.
417Expectation FailedServer cannot meet the requirements of the Expect request-header field.
418I’m a teapot (RFC 2324)April Fools’ joke code, not expected to be implemented. Used as an Easter egg.
Additional 4xx codes available for specific scenarios.

5xx: Server Errors

CodeNameDescription
500Internal Server ErrorUnexpected condition encountered; no more specific message available.
501Not ImplementedServer does not recognize the request method or lacks the ability to fulfill it.
502Bad GatewayServer acting as a gateway or proxy received an invalid response from the upstream server.
503Service UnavailableServer cannot handle the request; usually a temporary state (e.g., overloaded).
504Gateway TimeoutServer acting as a gateway or proxy did not receive a timely response from the upstream server.
505HTTP Version Not SupportedServer does not support the HTTP version used in the request.
Additional 5xx codes for specific server-related issues.

Unofficial Codes

Apache HTTP Server

  • 218 This is fine: Used by Apache servers. A catch-all error condition allowing message passage through the server when the ProxyErrorOverride setting is enabled.

Laravel Framework

  • 419 Page Expired: Used by Laravel when a CSRF Token is missing or expired.

Spring Framework

  • 420 Method Failure: Deprecated response used by the Spring Framework when a method has failed.

Twitter

  • 420 Enhance Your Calm: Returned by Twitter API when the client is rate-limited; versions

This cheat sheet serves as a quick reference for developers dealing with HTTP status codes. Understanding these codes and their meanings is crucial for effective troubleshooting and debugging in web development.

Leave a Reply