What is an HTTP status code?

An HTTP status code is a 3-digit code used to represent the status of an HTTP response from a web server. The first digit of any status code represents one of the five states of the response. When a user attempts to access content on a running host over HTTP or FTP, the Web server returns a numeric code indicating the status of the request. This status code is recorded in the server log and may also be displayed in a Web browser or FTP client. This is the code that displays the error message when we open the page in error. A status code can indicate whether a specific request has been successful and can also reveal the exact reason why the request failed.


HTTP protocols are generally classified into five categories

  • 1 – : retention
  • 2– : Indicates that the request is received successfully
  • 3– : The customer needs to further refine the request to complete the request
  • 4– : Customer error
  • 5– : Server error

Ten common status codes

  1. 200 Request success: the 200 request is the most common one. It indicates that the request is successful and the desired response header or data body is returned along with the response.
  2. 404 file not found: the 400 request is probably another common status code in addition to the 200 status. A 404 error occurs when a user tries to access a resource on a Web server (usually a Web page) that doesn’t actually exist. A 404 error can be caused by an invalid link, a misspelled URL, or the virtual host moving the requested page somewhere else (or deleting the requested page). Some sites have custom pages to prevent the effects of bad links.
  3. Part 206: The server has successfully processed some OF the GET requests. HTTP download tools such as FlashGet or Xunlei use such responses to implement breakpoint continuation, or to split a large document into multiple download segments for simultaneous downloading.
  4. 301 Permanent redirection: The requested resource has been permanently moved to the new location, and any future references to this resource should use one of the urIs returned by this response.
  5. 302 Temporary redirection: The requested resource now temporarily responds to the request from a different URI. Since such redirects are temporary, the client should continue to send future requests to the original address.
  6. 401 Unauthorized: The site returns an HTTP 401 error when a visitor tries to access a restricted page without authorization. An incorrect login attempt is the main cause of this error.
  7. 403 Deny access: The 403 error is similar to the 401 error, except that the 401 error is unauthorized and the 403 error denies access. The 403 error does not apply to any login. Error 403 occurs when you try to access a (prohibited) website directory.
  8. 400 error request: This is an error request. The Web server returns an HTTP 400 error to tell the visitor that the program the visitor is using to access the site is faulty or that the request has been corrupted.
  9. 500 Internal server error: This is one of the most common HTTP errors amenable to the definition of the HTTP 500 error. In general, HTTP 500 errors occur when the server’s code fails, or when the Web server has an internal error. For example, a Web server that is overloaded will not properly process access requests.
  10. 502 Invalid Gateway: An invalid response was received from the upstream server when a server working as a gateway or proxy tried to execute a request.

This paper draws lessons fromHere here, daily learning records.