A Complete List Of HTTP Status Lines


Informational responses (100-199)

When you browse the web, you may come across HTTP status codes that fall under the 1xx category. These codes are known as informational responses and are designed to convey some preliminary information about the request being processed. While not directly related to the success or failure of a request, these codes still play a crucial role in the communication between the client and the server. Let’s explore some of the most common informational response codes:

  1. 100 Continue: This response indicates that the initial part of the request has been received and the server is willing to continue processing the remaining part.
  2. 101 Switching Protocols: This code informs the client that the server is switching to a different protocol, as specified in the Upgrade header of the request.
  3. 102 Processing: This code is an interim response that signifies the server is still processing the request, but no final response is available yet.

Although these informational responses might not directly provide the end result of the request, they serve as a foundation for establishing successful communication between the client and server. Web developers and administrators should familiarize themselves with these status codes to gain a better understanding of the underlying mechanisms that facilitate efficient data exchange.

Successful responses (200-299)

When you access a website or send a request to a server, you hope for a successful response that indicates your request has been processed correctly. HTTP status codes falling under the 2xx range represent such successful responses. Let’s explore some of the most commonly encountered status codes in this category:

  1. 200 OK: This status code indicates that the request was successful, and the server is returning the requested information. It is the most commonly encountered successful response code.
  2. 201 Created: This code is used when a new resource has been successfully created as a result of the request. It is often accompanied by a Location header, indicating the URI of the created resource.
  3. 204 No Content: When a request is successful, but there is no information to return to the client, the server may choose to respond with this code. It is often used in scenarios where the request was a DELETE operation.

The successful response codes within the 200-299 range indicate that the client’s request was received and processed successfully. This means that the server was able to fulfill the request and provide the necessary information or take the appropriate action. As a web user, encountering these codes is a positive indication that your request was successful and that you can proceed with the desired action.

Web developers and administrators should pay attention to these successful response codes to ensure that their applications are functioning correctly. Additionally, proper handling of these codes can help provide a better user experience by accurately conveying the outcome of a request.

Redirection messages (300-399)

Have you ever encountered a situation where you were redirected to a different webpage after making a request? That redirection is made possible through HTTP status codes falling under the 3xx range. These codes signify that the client needs to take further action in order to fulfill the request. Let’s delve into some of the commonly encountered redirection messages:

  1. 300 Multiple Choices: When a resource has multiple options for representation, this status code is used to indicate that the client should choose one of them. The server may include a list of options in the response, allowing the client to make an informed decision.
  2. 301 Moved Permanently: This code indicates that the requested resource has been permanently moved to a new location. The server includes the new URI in the response’s Location header, prompting the client to update their bookmarks or redirects accordingly.
  3. 302 Found: Similar to the 301 code, this code signifies that the requested resource has been temporarily moved to a different location. The client should continue to use the original URI for future requests.

Redirection messages are an essential part of the web browsing experience. They allow websites to adapt and update their URLs while still providing the necessary information to clients. Understanding these codes will help web developers and administrators properly handle redirects and ensure a smooth user experience.

It is worth noting that some search engines treat 301 redirects differently from 302 redirects. If you need to permanently move a page, using a 301 redirect is recommended to retain your search engine rankings. On the other hand, if the move is temporary, a 302 redirect is more appropriate.

Client error responses (400-499)

When browsing the web, you might encounter client error responses in the form of HTTP status codes in the 4xx range. These codes indicate that there was an error with the request made by the client. Let’s explore some of the commonly encountered client error responses:

  1. 400 Bad Request: This status code suggests that the server could not understand the request due to invalid syntax or missing information.
  2. 401 Unauthorized: When a request requires user authentication, but the client fails to provide valid credentials, this code is returned, indicating that the request lacks proper authorization.
  3. 403 Forbidden: The server returns this code when the client does not have permission to access the requested resource.

Client error responses are crucial for both developers and users. They indicate that there was an issue with the request made by the client, such as a syntax error or lack of proper authentication. Web developers can utilize these status codes to troubleshoot issues and improve the overall functionality of their applications.

It is important to pay attention to client error responses and take appropriate action to address the issues causing them. As a web user, encountering these codes can serve as a hint to review and correct the request parameters or provide the necessary credentials to gain access to the desired content.

By understanding and properly handling these client error responses, web developers can enhance user experience and ensure that their applications provide clear and informative feedback to the users in the event of an error.

Server error responses (500-599)

Server error responses are HTTP status codes in the 5xx range that indicate a problem with the server’s ability to fulfill the client’s request. These codes are often encountered when something goes wrong on the server side. Let’s explore some of the commonly encountered server error responses:

  1. 500 Internal Server Error: This status code indicates that an unexpected error has occurred on the server, resulting in the inability to fulfill the request. The exact cause of the error is not specified, but it may involve issues with server configuration, code bugs, or resource limitations.
  2. 502 Bad Gateway: When acting as a gateway or proxy, this code is returned if the server received an invalid response from an upstream server.
  3. 503 Service Unavailable: This code is used when the server is temporarily unable to handle requests, often due to being overloaded or undergoing maintenance. It suggests that the client should try again later.

Server error responses can be frustrating for both web users and developers. For users, encountering these codes means that they are unable to access the desired content or perform the intended action. For developers, these codes indicate that there is an issue with the server-side implementation that needs to be addressed.

When encountering server error responses, it is important for developers to investigate and resolve the underlying issues. This may involve debugging code, optimizing server resources, or addressing configuration problems. By properly handling these errors, developers can improve the stability and reliability of their applications, providing a better user experience.

For web users, encountering server error responses is a reminder that the issue lies with the server and is beyond their control. Patience is key, as these errors are often temporary and resolved by the server administrators as quickly as possible.