List of common HTTP status codes

Posted: (EET/GMT+2)

 

Web servers and web application must use HTTP three digit status codes to indicate what was the result of the operation: success, failure, or a processing error.

No matter which development technology (CGI, ASP, ISAPI, etc.) you use, the server returns a numeric code with each response. The first digit indicates the general result:

1xx  Informational
2xx  Success
3xx  Redirection
4xx  Client error
5xx  Server error

Some common codes you can use:

200  OK
301  Moved Permanently
302  Moved Temporarily
400  Bad Request
401  Unauthorized
403  Forbidden
404  Not Found
500  Internal Server Error

You can observe these using a browser or using for example Telnet to see the raw response.

For example, a missing file returns:

HTTP/1.0 404 Not Found

Knowing about the response codes is useful when troubleshooting broken links or server configuration problems. RFC 1945 specifies the HTTP 1.0 protocol and response codes in section 9, "Status Code Definitions".