DEV Community

Cover image for The HTTP Status Codes CheatSheet [SAVE IT!] ๐Ÿ“œโœจ
Arjun Vijay Prakash
Arjun Vijay Prakash

Posted on

The HTTP Status Codes CheatSheet [SAVE IT!] ๐Ÿ“œโœจ

HTTP response codes are used to indicate success, failure, and other properties about the result of an HTTP request.

Each HTTP response is accompanied by a status code, and they are broken into five categories. Each of the response status codes is used to convey general information about the outcome of the request.

Let's explore some common HTTP Status Codes because who knows you shall need them tomorrow and after that the whole list of all the Codes for reference!

But before that, let's read about a fun fact.

๐Ÿ‘ˆ PS: Don't forget to bookmark the post!

๐Ÿค“ Fun Fact

Believe it or not, "418 I'm a Teapot" is a legitimate HTTP status code, although it comes with a twist of humour!

It was originally part of an April Fools' joke ๐Ÿคก by the Internet Engineering Task Force.

Image

This status code was introduced in the "Hyper Text Coffee Pot Control Protocol" (HTCPCP) in 1998.

Throwback to my article on this topic -


๐Ÿ‘‡ The Most Common HTTP Status Codes

  • 200 OK
  • 201 Created
  • 301 Moved Permanently
  • 302 Found
  • 304 Not Modified
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 501 Not Implemented
  • 504 Gateway Timeout

๐Ÿ“š The Great List of HTTP Status Codes

1๏ธโƒฃ Information Responses (100 โ€“ 199):

  • 100 Continue
  • 101 Switching Protocols
  • 102 Processing (WebDAV)
  • 103 Early Hints

2๏ธโƒฃ Successful Responses (200 โ€“ 299):

  • 200 OK
  • 201 Created
  • 202 Accepted
  • 203 Non-Authoritative Information
  • 204 No Content
  • 205 Reset Content
  • 206 Partial Content
  • 207 Multi-Status (WebDAV)
  • 208 Already Reported (WebDAV)
  • 226 IM Used (HTTP Delta encoding)

3๏ธโƒฃ Redirection Messages (300 โ€“ 399):

  • 300 Multiple Choices
  • 301 Moved Permanently
  • 302 Found
  • 303 See Other
  • 304 Not Modified
  • 305 Use Proxy Deprecated
  • 307 Temporary Redirect
  • 308 Permanent Redirect

4๏ธโƒฃ Client Error Responses (400 โ€“ 499):

  • 400 Bad Request
  • 401 Unauthorized
  • 402 Payment Required Experimental
  • 403 Forbidden
  • 404 Not Found
  • 405 Method Not Allowed
  • 406 Not Acceptable
  • 407 Proxy Authentication Required
  • 408 Request Timeout
  • 409 Conflict
  • 410 Gone
  • 411 Length Required
  • 412 Precondition Failed
  • 413 Payload Too Large
  • 414 URI Too Long
  • 415 Unsupported Media Type
  • 416 Range Not Satisfiable
  • 417 Expectation Failed
  • 418 I'm a teapot
  • 421 Misdirected Request
  • 422 Unprocessable Content (WebDAV)
  • 423 Locked (WebDAV)
  • 424 Failed Dependency (WebDAV)
  • 425 Too Early Experimental
  • 426 Upgrade Required
  • 428 Precondition Required
  • 429 Too Many Requests
  • 431 Request Header Fields Too Large
  • 451 Unavailable For Legal Reasons

5๏ธโƒฃ Server Error Responses (500 โ€“ 599):

  • 500 Internal Server Error
  • 501 Not Implemented
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout
  • 505 HTTP Version Not Supported
  • 506 Variant Also Negotiates
  • 507 Insufficient Storage (WebDAV)
  • 508 Loop Detected (WebDAV)
  • 510 Not Extended
  • 511 Network Authentication Required

๐Ÿค” Final Thoughts

HTTP responses are always accompanied by an HTTP response status code.

The first digit of a status code indicates the category, which often indicates whether the request succeeded or failed.

Each status code can be a valuable clue when troubleshooting problems between a client and a server.

Comment your thoughts about the awesome '418' status code!
I too had a few great laughs reading about this! ๐Ÿ˜†

Okay, that's it for today!

Connect with me @ Linktree.

Follow me on @ Twitter.
Quality content coming soon!

Happy Coding! ๐Ÿš€
Thanks for 26197! ๐Ÿค—

Top comments (4)

Collapse
 
michaeltharrington profile image
Michael Tharrington

Haha! I had never heard the teapot story. This Wikipedia article caught me up to speed.

Pretty cool that it has an April Fool's tie-in โ€” gonna have to remember this for next year, haha!

Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

This is a one of the most humorous things, if you think closely! Haha!

Collapse
 
ccoveille profile image
Christophe Colombier

I recommend these wonderful creations ๐Ÿ˜†

HTTP Status Dogs

HTTP Status Dogs. Hypertext Transfer Protocol Response status codes. And dogs.

favicon httpstatusdogs.com

HTTP Cats

API for HTTP Cats

favicon http.cat
Collapse
 
arjuncodess profile image
Arjun Vijay Prakash

This is so cool! ๐Ÿ˜†