HTTP Status Code Cheat Sheet

Sometimes things don’t go well and you end up with a white page with and a HTTP error code. It can be on any website you visit, or worse, on your own website.

HTTP Status Code Error 500

How to quickly understand what’s going on? Easy, just remember these five simple HTTP return codes:

1**. Hold on
2**. Here you go
3**. Go away
4**. You fucked up
5**. I fucked up

Joke appart, here is the list of the most common HTTP response status codes.

1xx: Information

100-199 are Informational responses. A few examples of the most common 100 errors are:

  • 100: Continue (server has received the request header, client can now send the body)
  • 101: Switching protocol (requester asked the server to switch protocols)

2xx: Successful

200-299 are successful responses. A few examples of the most common 200 errors are:

  • 200: OK (request is OK. This is the standard response for successful HTTP request)
  • 201: Created (request has been fulfilled, a new resource is created)

3xx: Redirection

300-399 are redirects. A few examples of the most common 300 errors are:

  • 301: Moved permanently (the page requested has moved to a new URL)
  • 302: Found (the page has moved temporarily to a new URL)
  • 304: Not modified (the requested page has not been modified since last time)
  • 307: Temporary redirect (the requested page has moved temporarily)

4xx: Client error

400-499 are client errors. A few examples of the most common 400 errors are:

  • 400: Bad request (request cannot be processed due to bad syntax)
  • 401: Unauthorized (the header in your request did not contain the necessary authorization)
  • 403: Forbidden (request was legal, but server refused to response)
  • 404: Not found (request page could not be found)
  • 410: Gone (requested page is no longer available)

5xx: Server error

500-599 are server errors. A few examples of the most common 500 errors are:

  • 500: Internal server error (the generic server error code when no other codes are applicable)
  • 502: Bad gateway (the server was acting as a gateway and received an invalid response)
  • 503: Service unavailable (the server is down or overloaded and cannot be accessed)

To learn more about HTTP Status codes, and see the full list, check out this page from mozilla.

HTTP Status Code Cheat Sheet

HTTP status response codes are an important part of the Internet. This is also something to be really rigorous with, because it can help SEO (or at least avoid hurting your SEO) if you keep your URLs up to date and manage your redirections scrupulously.

The last thing your visitors want (and the last thing Google want, too) is to have a website with many broken links, deleted pages without redirection, server issues, etc.

If you wonder how many time you site is unavailable, you can do so by checking your server logs. It usually logs every requests, so by searching for HTTP status code in your big text file you should be able to see if it happens often or not.

I remember having an issue with a midsize website where visitors get randomly “500 errors” and it was super hard to notice because it would happen to you, the web developer, only once in an hundred tries maybe. And if you visitors won’t complain or won’t send you a quick message to let you know, you might miss it.