HTML provides a number of error code responses, each relates to a request made on a server and the status of either the server or the website content.
They should really be thought referred to as status codes.
Often referred to as error codes the messages can be both error related or informative, for example the well known 404 error, detailing that the file requested cannot be found. Or conversely the 200 code, which confirms that the action completed successfully.
Some errors will give information about the server status. An example of this is the 503 error code which details that the server is out of resources.
Each request made to the server will give an error code. Web pages are commonly composed of multiple components: images, script and CSS resource files. Each one of these is treated separately regards the return of an error code.
The codes are grouped together in series:
- 1xx – Information
- 2xx – Successful
- 3xx – Redirection
- 4xx – Client error
- 5xx – Server error
The table below gives a summary of the main codes.
| Code | Description | Comments |
|---|---|---|
| 100 | Continue | The request headers have been received. The client can continue with the remainder of the request. |
| 101 | Switching Protocols | The requester has asked the server to switch protocols |
| 200 | OK | Action completed successfully. In general this is the response received for web page content. |
| 201 | Created | Success following a POST command |
| 202 | Accepted | The request has been accepted for processing. Processing not completed. |
| 203 | Partial Information | Response to a GET command, indicating that the returned meta information is from another resource/website. |
| 204 | No Content | The server has received the request. No information is available to send back. |
| 205 | Reset Content | The server completed processing the request. But is not returning any content. |
| 206 | Partial Content | The requested file was partially sent. This is usually caused by stopping or refreshing a web page. |
| 300 | Multiple Choices | |
| 301 | Moved Permanently | The requested directory, or file, has been moved permanently to another location. The browser is expected to retry the new location. |
| 302 | Moved Temporarily | The requested directory, or file, has been moved temporarily to another location. The browser is expected to retry the new location. |
| 303 | See Other | The response to the request is to be found under another URL. Details are in the response. |
| 304 | Not Modified | The cached version of the requested file is the same as the file to be sent. |
| 305 | Use Proxy | The requested response is available through a proxy. This should be used to access the content, details are available in the response. |
| 307 | Temporary Redirect | The request should be repeated using the supplied URL. Future requests to revert to the original URL. Same request method, eg POST, to be used in revised URL. |
| 308 | Permanent Redirect | The request should be repeated using the supplied URL. The change is permanent and should be followed for future requests. Same request method, eg POST, to be used in revised URL. |
| 400 | Bad Request | The request had bad syntax or was impossible to be satisfied. |
| 401 | Unauthorized | A valid user name and password were not supplied to access the file/directory. |
| 402 | Payment Required | Little used, original purpose not taken up. |
| 403 | Forbidden | No file name given in the request. Or the specified directory does not have the necessary permission to allow it to be viewed from the web. |
| 404 | Not Found | The requested file was not found. |
| 405 | Method Not Allowed | A method was used to access a resource which is incompatible with that resource. Typical example is the wrong type of form request, GET on a form expecting POST and vice versa. |
| 406 | Not Acceptable | The acceptable content, as detailed in the request, cannot be full filled, The content provided by the server does not match the accepted content. |
| 407 | Proxy Authentication Required | Authentication is required with a proxy before the request can be processed. |
| 408 | Request Time-Out | The server timed out waiting for the clients subsequent response. |
| 409 | Conflict | There was a conflict whilst accessing the resource. an example is an edit being made on a file. |
| 410 | Gone | Indicates that the requested resource has been removed and is no longer available. |
| 411 | Length Required | The request did not include the length of its content. |
| 412 | Precondition Failed | The requester included a condition which the server does not meet. |
| 413 | Request Entity Too Large | The request provided is too large for the server to handle. |
| 414 | Request-URL Too Large | The length of the URL sent to the server is too long. Most times this is too much info in the querystring. |
| 415 | Unsupported Media Type | The requested media type is not supported/configured by the server. |
| 500 | Server Error | A general error message. This is given when a more specific message is suitable. |
| 501 | Not Implemented | The server does not support the request method. |
| 502 | Bad Gateway | Either an intermediate server has a communication issue or the servers completing the request are not working correctly together. |
| 503 | Out of Resources | The server cannot process the request due to a system overload. This should be a temporary condition. |
| 504 | Gateway Time-Out | The service did not respond within the time frame that the gateway was willing to wait. |
| 505 | HTTP Version not supported | The server doesn’t support the protocol standard used in the request. |
Not all errors are reported within the browser.
To view the full messages fed back when viewing a web page tools such as Fiddler and Wireshark can be used.


