HTTP status codes

HTTP status codes are three-digit codes that Web servers return in response to Hypertext Transfer Protocol (HTTP) requests sent by Web browsers.

What is HTTP status codes?

Three-digit codes that Web servers return in response to Hypertext Transfer Protocol (HTTP) requests sent by Web browsers. They are also known as HTTP error codes because most of them signify some sort of error condition.

The HTTP status code is one of the first pieces of information returned by a Web server in response to a request from a Web browser, and it informs the browser of the status of the request. Status codes are usually displayed by Web browsers instead of the desired Web page when the server cannot satisfy the browser’s request for some reason. Status codes are grouped into categories by their first digit, as shown in the following table.

HTTP Status Codes by Category

Status Code Category Description
2 xx
Success
The action was completed.
3 xx
Redirection
Further action must be taken to fulfill the request.
4 xx
Client error
The request could not be accepted because of client error.
5 xx
Server error
The request could not be accepted because of server error.

Some common status codes in HTTP sessions that are fairly self-explanatory include the following:

  • 200 OK (not seen by the client)
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 File Not Found
  • 500 Internal Server Error
NOTE

Microsoft Internet Information Server (IIS) version 4 allows administrators to create customized HTTP status code pages that can be considerably more informative to users than status codes such as «Forbidden».