HTTP server return code

Source: Internet
Author: User

A question that comes up often -- especially with regards site stats -- is "what do all the codes mean? "
2XX codes (SUCCESS). The two hundred range is reserved for successful responses.
200 (OK ).The request was successful and information was returned. This is, by far, the most common code returned on the web.

201 (created ).If a POST command is issued by a browser (usually in processing a form) then the 201 code is returned if the resource requested to be created was actually created. if there is a delay in creating the resource the response shocould be 202, but may be 201 and contain a description of when it will be created.

202 (accepted ).If a request for processing was sent and accepted but not acted upon and the delay in acting is unknown, then this code shocould be sent instead of 201. note that 202 does not commit to processing the request; it only says the request was accepted. A pointer to some status monitor for the task is often encoded with this response so users can check back later.

203 (non-authoritative information ).Usually the preliminary information sent from a server to a browser comes directly from the server. if it does not, then this code might also be sent to indicate that information did not come from a known source.

204 (no new content ).The request was accepted and filled but no new information is being sent back. the browser processing ing this response shocould not change its screen display (although new, and changed, private header information may be sent ).

205 (reset content ).When you fill in a form and send the data, the server may send this code telling the browser that the data was received Ed and the action carried out so the browser shocould now clear the form (or reset the display in some manner ).

206 (partial content ).This code indicates the server has only filled part of a specific type of request.

3xx (redirection ).The 3xx codes indicate some need for further action by your browser. user action may or may not be necessary to cause this further action to take place; often it will just happen automatically. there are safeguards built into the specification designed to prevent infinite loops, which can sometimes result from automatic redirection.

300 (multiple choice ).You shoshould not see 300 standing alone; it serves as a template for the following specific codes.

301 (moved permanently ).As the name implies, the addressed resource has moved and all future requests for that resource shoshould be made to a new URL. Sometimes there is an automatic transfer to the new location.

302 (moved temporarily ).The addresses resource has moved, but future requests shocould continue to come to the original URL. Sometimes there is an automatic transfer to the new location.

303 (see other ).The response to your browser's request can be found elsewhere. Automatic redirection may take place to the new location.

304 (not modified ).In order to save bandwidth your browser may make a conditional request for resources. the conditional request contains an "if-modified-since" field and if the resource has not changed since that date the server will simply return the 304 code and the browser will use its cached copy the resource.

305 (use proxy ).This is notice that a specific proxy server must be used to access the resource. The URL of the proxy shocould be provided.

4xx (client error ).The 4xx codes are the ones you are most likely to actually see; fig Code 404. These codes indicate some sort of error has happened.

400 (Bad request ).The server did not understand the request. This is usually cured by resending the request.

401 (unauthorized ).The request requires some form of authentication (e.g ., userid and/or password) but did not contain it. usually, this code results in a box popping up in your browser asking you for the required information. once you supply it the request is sent again.

402 (payment required ).Reserved for future use. Surprised?

403 (Forbidden ).This is a sort of catch-all refusal. if the server understood the request but, for whatever reason, refuses to honor it, a code 403 will often be returned. the server may or may not explain why it is sending a 403 response and there is not much you can do about it.

404 (not found ).If you happen to mistype a URL or enter an old one that no longer exists this is the error you will likely see. the condition may be temporary or permanent but this information is rarely provided. sometimes code 403 is sent in place of 404.

405 (method not allowed ).Your browser has requested a resource using a procedure not allowed to obtain that resource. The response shoshould contain allowed procedures.

406 (not acceptable ).Your browser said only certain response types will be accepted and the server says the content requested does not fit those response types. (This is one way content monitoring can be implemented .)

407 (proxy authentication required ).This code is similar to 401, doesn't that the browser must first authenticate itself.

408 (request timeout ).Your browser waited too long and the server timed out. A new request must be sent.

409 (conflict ).If a site allows users to change resources and two users attempt to change the same resource there is a conflict. in this, and other such situations, the server may return the 409 code and shoshould also return information necessary to help the user (or browser) resolve the conflict.

410 (gone ).Code 410 is more specific than 404 when a resource can't be found. if the server knows, for a fact, that the resource is no longer available and no forwarding address is known, then 410 shocould be returned. if the server does not have specific information about the resource, then 404 is returned.

411 (length required ).For some processes a server needs to know exactly how long the content is. If the browser does not supply the proper length code 411 may result.

412 (precondition failed). A browser can put conditions on a request. If the server evaluates those conditions and comes up with a false answer, the 412 code may be returned.

413 (Request Entity too large ). if your browser makes a request that is longer than the server can process code 413 may be returned. additionally, the server may even close the connection to prevent the request from being resubmitted (this does not mean a modem connection will hang up-the browser's link to the site may be terminated and have be started over again ).

414 (request-URI Too long ). you will likely not see this one as it is rare. but, if the resource address you 've ve sent to the browser is too long this code will result. one of the reasons this code exists is to give the server a response when the server is under attack by someone trying to exploit fixed-length buffers by causing them to overflow.

415 (unsupported media type). If your browser makes a request using the wrong format, this Code may result.

5xx (server error ).The 5xx series of codes indicate cases where the server knows it has made an error or is not capable of answering the request. (mostly it means an error in server-side software ). in most cases the server shocould include some information explaining the error and say if the situation is temporary or permanent.

500 (internal server error ).An unexpected condition prevented the server from filling the request.

501 (not implemented). The server is not designed (or does not have the software) to fill the request.

502 (Bad Gateway). When a server acts as a go-between it may receive an invalid request. This code is returned when that happens.

503 (Service unavailable ). this code is returned when the server cannot respond due to temporary overloading or maintenance. some users, for example, have limited accounts which can only handle so far requests per day or bytes send per period of time. when the limits are exceeded a 503 code may be returned.

504 (gateway timeout). A gateway or proxy server timed out without responding.

505 (HTTP Version Not Supported). The browser has requested a specific transfer protocol version that is not supported by the server. The server shocould return what protocols are supported.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.