Http Status Code: List of Predefined Server Response Codes

HTTP status codes are predefined response codes that are sent by web servers in reply to requests made to them.


HTTP Status Codes

The status code provide details regarding the status of the request, aiding in pinpointing issues when a webpage or another resource fails to load correctly. Some common status codes are:

  • 200: Successful retrieval of the page by the server.
  • 404: Inexistence of the requested page.
  • 503: Temporary unavailability of the server.

1xx Informational

HTTP 1xx Informational status codes are a subset of HTTP response codes that are used to provide information to the client before the actual requested content is sent. These codes indicate that the initial part of the request has been received and understood by the server and that it's continuing to process the request. They are primarily informative and don't indicate success or failure like other status codes.

  • 100 Continue: This code signals the client to proceed with its request. It's returned by the server to notify the client that the initial part of the request has been received and not rejected.

  • 101 Switching Protocols: When the requester seeks to change protocols, this code acknowledges the server's commitment to making the switch.


2xx Successful

HTTP 2xx Successful status codes are a category of HTTP response codes that indicate the successful completion of a client's request by the server. These codes convey that the request was received, understood, and processed successfully, resulting in the server providing the requested content or performing the requested action as intended.

  • 200 OK: The server has successfully processed the request, typically providing the requested page.

  • 201 Created: Successful request leading to the server generating a new resource.

  • 202 Accepted: The server accepts the request for processing, although processing isn't completed yet.

  • 203 Non-Authoritative Information: Request processed successfully, yet the returned information may originate from another source.

  • 204 No Content: Successful processing without returning content.

  • 205 Reset Content: Processing is successful, but no content is returned. A difference from 204 is that the requester must reset the document view.

  • 206 Partial Content: Server delivers part of the resource due to a client-sent range header.

These 2xx codes indicate that the client's request was handled successfully and there were no errors encountered during the process. They are a positive acknowledgment that the server has effectively fulfilled the client's requirements, whether it's returning requested content, creating resources, or performing other actions as requested.


3xx Redirection

HTTP 3xx Redirection status codes are part of the HTTP response system and are used to indicate that the client's request requires further action to be taken in order to complete the request. These codes indicate that the requested resource has been moved or is temporarily unavailable at its original location, and the client needs to take additional steps to access the resource.

The 3xx Redirection codes are often used when websites change URLs, content has been moved, or the requested content is available under a different URL. These codes provide a mechanism for the server to inform the client about the new location or alternate resources.

  • 300 Multiple Choices: Offers multiple resource options for the client to choose from.

  • 301 Moved Permanently: The requested page has been moved permanently, with automatic redirection to the new location.

  • 302 Found: Resource temporarily resides elsewhere, but the original location should be used for future requests.

  • 303 See Other: The requested content can be found under a different location using a GET method.

  • 304 Not Modified: Indicates the requested resource hasn't changed since the last request.

  • 305 Use Proxy: Accessing the resource requires a proxy. However, some clients don't handle this response well for security reasons.

  • 307 Temporary Redirect: Resource temporarily resides elsewhere, yet the original location should still be used for future requests. Unlike 302, the method remains unchanged.

  • 308 Permanent Redirect (experimental): All requests, current and future, should be redirected using a new URL. Unlike 301 and 302, this retains the original HTTP method.

These redirection codes facilitate efficient management of resource location changes or temporary unavailability, ensuring that clients can access the appropriate content regardless of changes in URLs or server configurations.


4xx Client Error

HTTP 4xx Client Error status codes are a group of HTTP response codes that indicate that the client's request cannot be fulfilled by the server due to an error on the client's side. These codes are used to communicate that the server has understood the request, but the request contains errors or is not valid, preventing the server from processing it as intended.

  • 400 Bad Request: The request cannot be fulfilled due to incorrect syntax.

  • 401 Unauthorized: Authentication is required. Often used for pages behind a login.

  • 402 Payment Required: Reserved for future use, intended for digital payment schemes.

  • 403 Forbidden: Valid request, but the server refuses to respond.

  • 404 Not Found: Server can't locate the requested page.

  • 405 Method Not Allowed: The requested method isn't permitted for this resource.

  • 406 Not Acceptable: Requested resource can't match requested content characteristics.

  • 407 Proxy Authentication Required: Similar to 401, but requires proxy authentication.

  • 408 Request Timeout: Server waited too long for a request.

  • 409 Conflict: Request conflicts with the current state of the resource.

  • 410 Gone: Resource is no longer available at the server and won't return.

  • 411 Length Required: Server needs a defined Content-Length for the request.

  • 412 Precondition Failed: Server doesn't meet a requester's precondition.

  • 413 Request Entity Too Large: Server can't process due to oversized request entity.

  • 414 Request-URI Too Long: Server can't process due to lengthy Request-URI.

  • 415 Unsupported Media Type: Server can't process due to unsupported request entity format.

  • 416 Requested Range Not Satisfiable: Server can't provide the requested range for the resource.

  • 417 Expectation Failed: Server can't meet the requirements of the Expect request-header field.

These 4xx codes indicate issues that can typically be addressed by the client making proper adjustments to their request, authentication credentials, or permissions. They highlight errors on the client's side that prevent the server from fulfilling the request, and they are intended to guide clients in resolving these issues to successfully communicate with the server.


5xx Server Error

HTTP 5xx Server Error status codes are a set of HTTP response codes that indicate that the server has encountered an error or is otherwise incapable of fulfilling a valid client request. These codes point to problems on the server's side rather than the client's and signify that the server failed to process the request properly.

  • 500 Internal Server Error: Server encounters an unexpected condition preventing request processing.

  • 501 Not Implemented: Server doesn't recognize or can't handle the request method.

  • 502 Bad Gateway: While acting as a gateway or proxy, the server receives an invalid response from the upstream server.

  • 503 Service Unavailable: Server is overloaded or down for maintenance, temporarily unable to handle requests.

  • 504 Gateway Timeout: Server acting as a gateway or proxy doesn't receive a timely response from the upstream server.

  • 505 HTTP Version Not Supported: Server doesn't support or refuses to support the HTTP protocol version in the request.

These 5xx codes indicate that the server encountered issues while attempting to process the client's request. They help inform the client that the problem lies with the server and is beyond the client's control. Such errors often require action on the server administrator's part to resolve the underlying issues causing the errors.