Skip to content

HTTP Return Codes

HTTP return codes are 3 digit (usually) numbers that are returned to your browser when they request a page. Typically your browser will take care of these, but if you are developing your own site you should put these in your bag of knowledge.

Informational – 1xx
100 – Continue – This is used to inform the client that the first part of teh request has been received and was not rejected by the server. The client should continue.
101 – Switching protocols – The client requested a chane in protocol (ex: from HTTP 1.0 to HTTP 1.1) and the server says this is OK.

Success – 2xx
200 – OK – The request was successful.
201 – Created – An additional resource was created per the request.
202 – Accepted
203 – Non-Authoritative Information – Same as a 200, but may come from another server.
204 – No Content – The request was successful, but there is no data to return.
205 – Reset Content – The request was successful, but content was not served. The server will wait for more user input before proceeding.
206 – Partial Content – Results from a successful partial GET of content.

Redirection – 3xx
300 – Multiple Choice – The resource requested could be one of many. The client will typically be given a list of options, though the server could automatically redirect.
301 – Moved Permanently – The resource has moved to a new location. This location should be used instead of the one entered.
302 – Moved Temporarily
303 – See Other
304 – Not Modified – The copy of the content already at the client is the same as on the server. Typically used with content that is cached locally so it does not have to be resent.
305 – Use Proxy – The resource requested must be accessed through the proxy at the URL returned.

Client Error – 4xx
400 – Bad Request – The server did not understand the request. Typically this is caused by a mistyped URL.
401 – Unauthorized – A required username and password was not entered.
402 – Payment Required – Not currently used, but reserved for future use.
403 – Forbidden – The URL requested requires more permissions than you have. Credentials will not help as they would in a 401.
404 – Not found – The resource requested could not be found on the server.
405 – Method Not Allowed
406 – Not Acceptable – The file being returned was indicated by the browser as one it cannot process.
407 – Proxy Authentication Required – Similar to error 401, but the client must first authenticate itself to the proxy to access the page.
408 – Request Timeout – The request took too long to process. Try the request again.
409 – Conflict
410 – Gone – Similar to error 404, but a 410 error is considered more “permanent”.
411 – Length Required
412 – Precondition Failed
413 – Request Entity Too Large – The requested content is more than the server can process.
414 – Request URI Too Long – The URL requested is too long for the server to process.
415 – Unsupported Media Type
416 – Requested Range Not Satisfiable
417 – Expectation Failed

Server Error – 5xx
500 – Internal Server Error – There is an internal error on the server. Nothing can be done, as this is a problem with the host.
501 – Not Implemented – The request was for something that the server cannot do.
502 – Bad Gateway – The server you requested a document from had to contact a second server to retrieve it. The request from the second server failed.
503 – Service Unavailable – The server cannot process your request. This can either be due to too much activity or the server being down.
504 – Gateway Timeout
505 – HTTP Version Not Supported

Published inProgramming

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *