HTTP (Hypertext Transfer Protocol) is the basis of communication on the World Wide Web, enabling data transfer between clients and servers. HTTP status codes are three-digit numbers used by the server to inform the client of the status of the request and the nature of the response. Below, we outline the most common HTTP codes and provide brief definitions of each.
1xx (Information)
- 100 Continue: The server confirms that the client may proceed with sending the request.
- 101 Switching Protocols: The server has accepted the client’s request to switch protocols.
2xx (Successful)
- 200 OK: The request was successful and the server’s response is correct.
- 201 Created: The request was successful, and the server has created a new resource.
- 202 Accepted: The request has been accepted but has not yet been fulfilled.
- 203 Non-Authoritative Information: The server responded successfully, but the response data is not entirely reliable.
- 204 No Content: The request was successful, but there is no further information in the response.
- 205 Reset Content: The request was successful, and the client must reload the document.
- 206 Partial Content: The request has been partially fulfilled.
3xx (Redirect)
- 300 Multiple Choices: The requested resource has several versions; the client must choose one.
- 301 Moved Permanently: The requested resource has been permanently moved to a different URL.
- 302 Found (formerly ‘Moved Temporarily’): The requested resource has been temporarily redirected to another URL.
- 303 See Other: The requested resource can be found at a different URL, and the client must follow that URL.
- 304 Not Modified: The resource has not changed since the last request; there is no need to reload it.
- 307 Temporary Redirect: The requested resource has been temporarily redirected to a different URL, but the client must use the original URL for future requests.
If redirects are going round in circles, the browser will display a ‘too many redirects’ error; you can read about the causes of this and how to fix it in the article ‘Too many redirects’ error.
4xx (Client error)
- 400 Bad Request: The server is unable to interpret the request due to incorrect syntax.
- 401 Unauthorised: The request requires authentication.
- 403 Forbidden: The client does not have permission to access the requested resource.
- 404 Not Found: The requested resource cannot be found on the server.
- 405 Method Not Allowed: The HTTP method used by the client is not permitted for this resource.
- 406 Not Acceptable: The server is unable to generate a response that matches the Accept headers sent by the client.
- 407 Proxy Authentication Required: The request requires authentication on the proxy server.
- 408 Request Timeout: The client’s request exceeded the time limit set by the server.
- 409 Conflict: The information provided in the request conflicts with the server’s status.
- 410 Gone: The requested resource is no longer available on the server, and there is no known new location for it.
- 411 Length Required: The ‘Content-Length’ header is required for this request.
- 412 Precondition Failed: The condition specified by the client was not met on the server.
- 413 Payload Too Large: The request is too large for the server to process.
- 414 URI Too Long: The requested URL is too long and the server is unable to process it.
- 415 Unsupported Media Type: The media type sent in the request is not supported by the server.
- 416 Range Not Satisfiable: The requested range is not available on the resource.
- 417 Expectation Failed: The ‘Expect’ header specified by the client was not fulfilled on the server.
- 428 Precondition Required: A ‘Precondition’ header is required for the request.
- 429 Too Many Requests: The client has sent too many requests in a short period of time; the server is limiting the number of requests.
- 431 Request Header Fields Too Large: The request headers are too large, and the server is unable to process the request.
5xx (Server error)
- 500 Internal Server Error: The server is unable to fulfil the request due to an internal error.
- 501 Not Implemented: The server does not support the HTTP method used in the request.
- 502 Bad Gateway: The server, acting as a gateway or proxy, received an invalid response from the upstream server.
- 503 Service Unavailable: The server is temporarily unable to process requests.
- 504 Gateway Timeout: The server, acting as a gateway or proxy, did not receive a response from the upstream server in time.
- 505 HTTP Version Not Supported: The server does not support the HTTP version used in the request.
- 506 Variant Also Negotiates: The content selection process specified by the server is incorrect.
You can read about how to interpret error messages in practice in the article ‘Interpreting and Troubleshooting Website Error Messages’, and about how to extract error codes from logs in our article on ‘Analysing Web Server Logs’.