Http status code list_basic tutorial

Source: Internet
Author: User
The http status of a website is very important for website maintenance personnel. When a website encounters a problem, we must first diagnose the http status of the website, so as to further confirm where the problem occurs, we often encounter prompts such as 404, 500, and 302. What exactly do they mean? In addition to these common status codes, which of the following are possible status codes that we have never met? I have made a summary here to share with you.

HTTP status code Summary
Bytes -----------------------------------------------------------------------------------------------------------

2XX succeeded in processing the request status code.
200 the server has successfully processed the request and provided the requested webpage.
204 the server successfully processed the request but did not return any content.
Redirect 3XX: the number of redirection requests must not exceed 5.
301 the requested webpage has been permanently moved to a new location. Code 301 is used when the URLs changes. Save the new URL in the search engine index.
302 the requested webpage is temporarily moved to a new location. The original URL is saved in the search engine index.
304 if the web page is not updated after the last request, use code 304 to notify the search engine robot, which can save bandwidth and costs.
Client error 4XX indicates that the request may fail, which hinders server processing.
400 the server does not understand the request syntax.
403 the server rejects the request.
404 The server cannot find the requested webpage. This code is often returned for webpages that do not exist on the server.
410 after the requested resource is permanently deleted, the server returns this response. This code is similar to the 404 (not found) code,
However, when a resource exists before and does not exist, it is sometimes used to replace Code 404. If the resource has been permanently deleted, use 301 to specify a new location for the resource.
Server Error 5XX indicates that the server encountered an internal error when processing the request. These errors may be server errors rather than request errors.
500 the server encountered an error and could not complete the request.
503 the server is currently unavailable (due to overload or downtime maintenance ). Generally, this is only a temporary status.

Detailed breakdown:

2XX successful

200 normal; the request has been completed.
201 normal; followed by the POST command.
202 normal; accepted for processing, but not completed.
203 normal; partial information-only part of the returned information.
204 normal; no response-received request, but no information to send back.

3XX redirection

301 moved-the requested data has a new location and the change is permanent.
302 found-the requested data temporarily has different Uris.
303 refer to others-you can find the response to the request under another URI and use the GET method to retrieve the response.
304 not modified-the document was not modified as expected.
305 use proxy-the requested resource must be accessed through the proxy provided in the location field.
306 not used-no longer used; keep this code for future use.

Errors in 4XX Client

400 Error request-the request has a syntax problem or cannot meet the request.
401 unauthorized-unauthorized client access to data.
402 payment required-the billing system is in effect.
403 forbidden-access is not required even if authorized.
404 Not found-the server cannot find the specified resource; the document does not exist.
407 proxy authentication request-the client must first use proxy authentication itself.
415 the media type is not supported-the server rejects service requests because the Request Entity format is not supported.

5XX Server Error

500 internal error-the server cannot complete the request due to exceptions.
501 not executed-the server does not support the requested tool.
502 error gateway-the server receives an invalid response from the upstream server.
503 unable to obtain services-the server cannot process requests due to temporary overload or maintenance.

504 Gateway Timeout
When a server that works as a gateway or proxy attempts to execute a request, it fails to promptly access the upstream server (the server identified by the URI, such as HTTP, FTP, LDAP) or the secondary server (such as DNS) receive the response.
Note: Some proxy servers will return error 400 or 500 when DNS query times out.

505 HTTP Version Not Supported
The server does not support or rejects the HTTP Version Used in the request. This implies that the server cannot or does not want to use the same version as the client. The response should contain an entity that describes why the version is not supported and what protocols the server supports.

506 Variant Also Negotiates
Extended by transparent content negotiation protocol (RFC 2295), it indicates that the server has an internal configuration error: the requested negotiated variable resource is configured to be used in transparent content negotiation, therefore, it is not a proper focus in a negotiation process.

507 Insufficient Storage
The server cannot store the content required to complete the request. This situation is considered temporary. WebDAV (RFC 4918)

508 Loop Detected
The server finds an infinite loop in the request.

509 Bandwidth Limit Exceeded
The server reaches the bandwidth limit. This is not an official status code, but it is still widely used.

510 Not Extended
The policies required for obtaining resources are not met. (RFC 2774)

Common Errors

Error 500

500 error is a problem that the webmaster often encounters. My experience, causes, and solutions are summarized as follows:

1. If the number of running users is too large, causing too much pressure on the server and the server cannot respond, an HTTP500 error is reported.

This is the main reason why the website reports a 500 error. Why does a lot of websites suddenly report a 500 error (service unavailable? 90% is caused by the Space pressure exceeding the upper limit set by the Space Provider.

In this case, it is best to first find the after-sales service of the Space Provider. They will usually help you recycle the application pool and solve the problem. If no after-sales service is found, you can find the project "recycle application pool" in the space management background and manually execute it. However, some space management backend does not provide this service.

2. If the possibility of 1st is ruled out, a major cause is a program problem.

You can create a simple test page to check whether the operation is successful, and then check the error page to make targeted modifications.

HTTP500 error is reported if the link is not associated. Manually or automatically associated to solve the problem.

3. If the operations in the test need to insert data into the database, the tablespace in the database may be full if the data volume is large, or the buffer pool is small, it cannot meet the needs of data access, etc, may cause an HTTP500 error.

The solution is to adjust the database, modify the connection pool size, and so on. you can modify the size based on your actual situation.


HTTP status code Summary
Bytes -----------------------------------------------------------------------------------------------------------

2XX succeeded in processing the request status code.
200 the server has successfully processed the request and provided the requested webpage.
204 the server successfully processed the request but did not return any content.
Redirect 3XX: the number of redirection requests must not exceed 5.
301 the requested webpage has been permanently moved to a new location. Code 301 is used when the URLs changes. Save the new URL in the search engine index.
302 the requested webpage is temporarily moved to a new location. The original URL is saved in the search engine index.
304 if the web page is not updated after the last request, use code 304 to notify the search engine robot, which can save bandwidth and costs.
Client error 4XX indicates that the request may fail, which hinders server processing.
400 the server does not understand the request syntax.
403 the server rejects the request.
404 The server cannot find the requested webpage. This code is often returned for webpages that do not exist on the server.
410 after the requested resource is permanently deleted, the server returns this response. This code is similar to the 404 (not found) code,
However, when a resource exists before and does not exist, it is sometimes used to replace Code 404. If the resource has been permanently deleted, use 301 to specify a new location for the resource.
Server Error 5XX indicates that the server encountered an internal error when processing the request. These errors may be server errors rather than request errors.
500 the server encountered an error and could not complete the request.
503 the server is currently unavailable (due to overload or downtime maintenance ). Generally, this is only a temporary status.

Detailed breakdown:

2XX successful

200 normal; the request has been completed.
201 normal; followed by the POST command.
202 normal; accepted for processing, but not completed.
203 normal; partial information-only part of the returned information.
204 normal; no response-received request, but no information to send back.

3XX redirection

301 moved-the requested data has a new location and the change is permanent.
302 found-the requested data temporarily has different Uris.
303 refer to others-you can find the response to the request under another URI and use the GET method to retrieve the response.
304 not modified-the document was not modified as expected.
305 use proxy-the requested resource must be accessed through the proxy provided in the location field.
306 not used-no longer used; keep this code for future use.

Errors in 4XX Client

400 Error request-the request has a syntax problem or cannot meet the request.
401 unauthorized-unauthorized client access to data.
402 payment required-the billing system is in effect.
403 forbidden-access is not required even if authorized.
404 Not found-the server cannot find the specified resource; the document does not exist.
407 proxy authentication request-the client must first use proxy authentication itself.
415 the media type is not supported-the server rejects service requests because the Request Entity format is not supported.

5XX Server Error

500 internal error-the server cannot complete the request due to exceptions.
501 not executed-the server does not support the requested tool.
502 error gateway-the server receives an invalid response from the upstream server.
503 unable to obtain services-the server cannot process requests due to temporary overload or maintenance.

504 Gateway Timeout
When a server that works as a gateway or proxy attempts to execute a request, it fails to promptly access the upstream server (the server identified by the URI, such as HTTP, FTP, LDAP) or the secondary server (such as DNS) receive the response.
Note: Some proxy servers will return error 400 or 500 when DNS query times out.

505 HTTP Version Not Supported
The server does not support or rejects the HTTP Version Used in the request. This implies that the server cannot or does not want to use the same version as the client. The response should contain an entity that describes why the version is not supported and what protocols the server supports.

506 Variant Also Negotiates
Extended by transparent content negotiation protocol (RFC 2295), it indicates that the server has an internal configuration error: the requested negotiated variable resource is configured to be used in transparent content negotiation, therefore, it is not a proper focus in a negotiation process.

507 Insufficient Storage
The server cannot store the content required to complete the request. This situation is considered temporary. WebDAV (RFC 4918)

508 Loop Detected
The server finds an infinite loop in the request.

509 Bandwidth Limit Exceeded
The server reaches the bandwidth limit. This is not an official status code, but it is still widely used.

510 Not Extended
The policies required for obtaining resources are not met. (RFC 2774)

Common Errors

Error 500

500 error is a problem that the webmaster often encounters. My experience, causes, and solutions are summarized as follows:

1. If the number of running users is too large, causing too much pressure on the server and the server cannot respond, an HTTP500 error is reported.

This is the main reason why the website reports a 500 error. Why does a lot of websites suddenly report a 500 error (service unavailable? 90% is caused by the Space pressure exceeding the upper limit set by the Space Provider.

In this case, it is best to first find the after-sales service of the Space Provider. They will usually help you recycle the application pool and solve the problem. If no after-sales service is found, you can find the project "recycle application pool" in the space management background and manually execute it. However, some space management backend does not provide this service.

2. If the possibility of 1st is ruled out, a major cause is a program problem.

You can create a simple test page to check whether the operation is successful, and then check the error page to make targeted modifications.

HTTP500 error is reported if the link is not associated. Manually or automatically associated to solve the problem.

3. If the operations in the test need to insert data into the database, the tablespace in the database may be full if the data volume is large, or the buffer pool is small, it cannot meet the needs of data access, etc, may cause an HTTP500 error.

The solution is to adjust the database, modify the connection pool size, and so on. you can modify the size based on your actual situation.



1 **: request received, continue processing
2 **: The operation is successfully received, analyzed, and accepted.
3 **: the request must be further processed.
4 **: The request contains an error syntax or cannot be completed
5 **: the server failed to execute a fully valid request.

100 -- the customer must continue to send the request
101 -- the client requests the server to convert the HTTP protocol version according to the request

200 -- transaction successful
201 -- prompt to know the URL of the new file
202 -- accept and process, but not complete
203 -- the returned information is uncertain or incomplete
204 -- the request is received, but the returned information is null.
205 -- when the server completes the request, the user agent must reset the file that has been browsed.
206 -- the server has completed some users' GET requests

300 -- the requested resources can be obtained in multiple places
301 -- Delete request data
302 -- request data found at other addresses
303 -- we recommend that you access other URLs or access methods.
304 -- the client has executed GET, but the file has not changed
305 -- the requested resource must be obtained from the address specified by the server
306 -- code used in HTTP of the previous version, which is not used in the current version
307 -- declaring temporary deletion of requested resources

400 -- incorrect request, such as syntax error
401 -- authorization request failed
402 -- retain valid ChargeTo header response
403 -- the request is not allowed
404 -- no file, query, or URl found
405 -- the method defined in the Request-Line field is not allowed.
406 -- the requested resource is inaccessible due to the user's Accept drag.
407 -- similar to 401, the user must first be authorized on the Proxy Server
408 -- the client did not complete the request within the specified time
409 -- the request cannot be completed due to the current resource status
410 -- this resource is no longer available on the server and there is no further reference address
411 -- the server rejects the User-Defined Content-Length attribute request
412 -- one or more request header fields are incorrect in the current request
413 -- the requested resource is larger than the size allowed by the server
414 -- the requested resource URL is longer than the length allowed by the server
415 -- the requested resource does not support the format of the requested project
416 -- The request contains the Range request header field, which has no range indication value in the current request resource Range.
It does not contain the If-Range request header field.
417 -- the server does not meet the expectation specified by the request's CT header field. If it is a proxy server, it may be
The first-level server cannot meet the request

500 -- Internal error occurred on the server
501 -- the server does not support the requested function
502 -- the server is temporarily unavailable, sometimes to prevent system overload
503 -- server overload or service suspension
504 -- the gateway is overloaded. The server uses another gateway or service to respond to the user. The waiting time is long.
505 -- the server does not support or reject the specified HTTP version in the Request Header

========================================================== ============================

English version:

100: Continue
101: Switching Protocols
102: Processing

200: OK
201: Created
202: Accepted
203: Non-Authoriative Information
204: No Content
205: Reset Content
206: Partial Content
207: Multi-Status

300: Multiple Choices
301: Moved Permanently
302: Found
303: See Other
304: Not Modified
305: Use Proxy
306 :( Unused)
307: Temporary Redirect

400: Bad Request
401: Unauthorized
402: Payment Granted
403: Forbidden
404: File Not Found
405: Method Not Allowed
406: Not Acceptable
407: Proxy Authentication Required
408: Request Time-out
409: Conflict
410: Gone
411: Length Required
412: Precondition Failed
413: Request Entity Too Large
414: Request-URI Too Large
415: Unsupported Media Type
416: Requested range not satisfiable
417: Expectation Failed
422: Unprocessable Entity
423: Locked
424: Failed Dependency

500: Internal Server Error
501: Not Implemented
502: Bad Gateway
503: Service Unavailable
504: Gateway Timeout
505: HTTP Version Not Supported
507: Insufficient Storage

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: info-contact@alibabacloud.com 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.