HTTP Status Codes Cheat Sheet

What is HTTP Status code ?

When a user make web request or a HTTP request to a web server using his/her browser, the web server responds with different HTTP status codes as a response. The HTTP status codes are dependable on the type of response that the server gives to the user browser.

You can also check out our youtube video on this topic.

For example, we might have seen Error 404 Not Found multiple times while browsing the website. Code 404 is an HTTP status code. 404 Not Found means that the resource we are looking for on the website is not available. The resource can be a file, image, video, post, etc.

404 not found HTTP response code

In the image above, we tried to look for lmao in our website but the file/post or path lmao is not present there. Hence, the web server gave us a 404 Not Found response which is an HTTP status code. Okay, let’s discuss about different types of HTTP status codes.

  • 1xx: Informational
  • 2xx: Success
  • 3xx: Redirection
  • 4xx: Client Error
  • 5xx: Server Error

All the Status codes in the range of 100 are Informational, 200 are Success, 300 are for redirection, 400 are for Client-side error and 500 are for server-side error. Now, we will see each category in detail.

1XX: HTTP Status Codes For Informational Message

101Switching Protocols
100 HTTP status codes

2XX: HTTP Status Codes for Success

203Non-Authoritative Information
204 No content
205Reset Content
206Partial Content
207Multi status
208Already Reported
226IM used
200 HTTP Status codes

3XX: HTTP Status Code For Redirection

300Multiple Choices
301Moved Permanently
303See other
304Not Modified
305Use proxy
307Temporary Redirect
308Permanent redirect
300 HTTP status codes

4XX: Client Side Error HTTP Codes

400Bad Request
402Payment Required
404Not Found
405Method not allowed
406Not acceptable
407Proxy Authentication required
408Request Timeout
411Length required
412Precondition Failed
413Payload too large
414Request URI too long
415Unsupported Media type
416Requested Range Not satisfiable
417Expectation Failed
421Misdirect request
422Unprocessable Entity
426Upgrade required
428Precondition required
429Too many requests
431Request Header too large
499Client closed request
400 HTTP Status codes

5XX: Server Error HTTP Codes

500Internal Server Error
501Not Implemented
502Bad Gateway
503Service Unavailable
504Gateway Timeout
505HTTP version not supported
507Insufficient Storage
511Network Authentication Required
599Network Connect Time out Error
500 Error HTTP codes

Common HTTP Status Codes

  1. 200 OK: This response code is sent by server when our request is received and successfully processed in server.
  2. 201 Created: Request is accepted and and new resource is in the process of creation.
  3. 202 Accepted: Request is accepted for procession but the process is not completed.
  4. 301 Moved Permanently: The requested page has been moved to a new location or new URL permanently.
  5. 302 Found: Requested page is moved to a new URL temporarily.
  6. 401 Unauthorized: User authentication must be performed in order to request the object or make the request successful. The requested page needs username and password or any other type of authentication.
  7. 403 Forbidden: The request would not be success even we are authenticated. The page is protected from being accessed.
  8. 404 Not Found: The requested object is not found found in the server. The object can be a path, page or a URL.
  9. 405 Method Not Allowed: The web server has received and recognized the request, but has rejected the specific HTTP method as it is not supported by the server.
  10. 411 Content Length Required: The server requires Content-Length header in its request for processing the request.
  11. 500 Internal Server Error: An error has occurred in the server, which prevented it from completing the request.
  12. 503 Service Unavailable: The web server is unable to complete a user request due to various reasons such as server crash, high traffic in server, lack of resource in server etc.

Now we will discuss how browser uses these HTTP status codes in real life. We will visit some website and check how the browser and the web server communicates with each other using these status codes. if you are new to HTTP Request and HTTP Response and how they works. Check out this post on Introduction to HTTP Headers.

At first we will browse in our browser and check network tab to see the response from server.

image 1
200 OK from server.

As we can see in above image we received 200 OK response from web server. That indicates we received success response from server as a result webpage is loaded in our browser.

Let us try checking admin panel of a website at Browse in browser and check network request.

image 3
302 Found Response from server

As we can see in above image our visited URL received 302 Found from server, that means we received a new URL from server where we are redirected for login. In the step-3 we got new location set in our response header, where we will get another webpage.

Let try another thing, now we will try to make request to some sensitive file in web server, which is generally protected by server for security purpose. Visit the URL: and we will see response from server.

image 4
403 Forbidden from server

As we saw, we got Forbidden from server because the file is protected by server and cannot be accessed directly.

Leave a Reply

Your email address will not be published. Required fields are marked *