Common HTTP statuses (required by web programmers)

Source: Internet
Author: User
Tags unsupported

In the practical application of website construction, many small mistakes may occur, just as MySQL was not optimized at the beginning, affecting the overall browsing effect of the website. In fact, the regular HTTP status code of a website is the same. Google cannot verify the website in several ways. It is mentioned that the 404 status page is not set properly, leading to the failure of Google administrator tool verification, of course, it affects not only this aspect, but also the overall browsing effect of the website. Therefore, it is necessary for a website webmaster to fully understand the specific meaning of the HTTP status code.

If a request sent to your server requires that a webpage on your website be displayed (for example, when a user accesses your webpage through a browser or crawls a webpage through googlebot ), the server returns an HTTP status code to respond to the request.

This status code provides information about the request status, telling googlebot about your website and the requested webpage.

Some common status codes are:

  • 200-The server returns the webpage successfully.
  • 404-The requested webpage does not exist.
  • 503-Server timeout

The complete list of HTTP status codes is provided below. Click the link to learn more. You can also access
For more information, see the W3C page on the HTTP status code.

1xx (temporary response)
Status Code indicating a temporary response and requiring the requester to continue the operation.

100 (continue) The requester shall continue to make the request. The server returns this code, indicating that the first part of the request has been received and is waiting for the remaining part.
101 (switching Protocol) The requester has requested the server switching protocol, and the server has confirmed and is ready to switch.

2xx (successful)

Indicates that the request status code is successfully processed.

200 (successful) The server has successfully processed the request. Generally, this indicates that the server provides the requested webpage. If this status code is displayed for your robots.txt file, it indicates that Googlebot has successfully retrieved the file.
201 (created) The request is successful and the server creates a new resource.
202 (accepted) The server has accepted the request but has not yet processed it.
203 (unauthorized information) The server has successfully processed the request, but the returned information may come from another source.
204 (NO content) The server successfully processes the request but does not return any content.
205 (reset content) The server successfully processes the request but does not return any content. Unlike the 204 response, this response requires the requester to reset the document view (for example, clear the form content to enter new content ).
206 (partial content) The server successfully processes some GET requests.

3xx (redirection)
Further operations are required to complete the request. These status codes are usually used for redirection. Google recommends that you use redirection no more than 5 times in each request. You can use the website administrator tool to check if googlebot encounters any problems when crawling the redirected webpage.DiagnosisThe web capture page below lists googlebot caused by redirection errors
URLs that cannot be crawled.

300 (multiple options) For requests, the server can perform multiple operations. The server selects an operation based on the user agent or provides an operation list for the user agent to select.
301 (permanent movement) The requested webpage has been permanently moved to a new location. When the server returns this response (response to a GET or HEAD request), it automatically redirects the requester to a new location. You should use this code to tell Googlebot that a webpage or website has been permanently moved to a new location.
302 (temporary movement) The server currently responds to requests from different web pages, but the requester should continue to use the original location to respond to subsequent requests. Similar to code 301 In response to GET and HEAD requests, this code automatically redirects the requester to different locations. However, you should not use this code to tell Googlebot that a webpage or website has been moved, because Googlebot will continue to capture the original location and compile the index.
303 (view other locations) The server returns this code when the requester uses a separate GET request to retrieve the response from different locations. For all requests except HEAD, the server automatically redirects to other locations.
304 (not modified)

The requested webpage has not been modified since the last request. When the server returns this response, no webpage content is returned.

If the webpage has not been changed Since the last request, you should Configure the server to return this response (known as the If-Modified-Since HTTP header ). The server can tell Googlebot that the webpage has not changed since the previous capture, thus saving bandwidth and overhead.

305 (use proxy) The requester can only use a proxy to access the requested webpage. If the server returns this response, it also indicates that the requester should use a proxy.
307 (temporary redirection) The server currently responds to requests from different web pages, but the requester should continue to use the original location to respond to subsequent requests. This Code corresponds to the <ahref = answer. py? The answer => 301 </a> code is similar to that, and the requester is automatically transferred to different locations. However, you should not use this code to tell Googlebot that a page or website has been moved, because Googlebot will continue to capture the original location and compile the index.

4xx (request error)
These status codes indicate that the request may fail and impede server processing.

400 (incorrect request) The server does not understand the request syntax.
401 (unauthorized) The request requires authentication. The server may return this response for the webpage requested after logon.
403 (Forbidden) The server rejects the request. If you see this status code when googlebot tries to capture a valid webpage on your website (you can go to the Google website administrator toolDiagnosisUnderNetwork captureThis information is displayed on the page). It may be that your server or host rejects googlebot access.
404 (not found)

The server cannot find the requested webpage. For example, this code is often returned for webpages that do not exist on the server.

If you do not have the robots.txt file on your website, and you see this status code on the robots.txt page of the Google website administrator tool diagnostic tab, this is the correct status code. However, if you have a robots.txt file and you see this status code, it means that your robots.txt file can have a wrong name or a wrong location (the file should be in the top-level domain and named robots.txt ).

If you see this status code for the URL crawled by googlebot (in
HTTP Error Page), indicating that googlebot may be followed by an invalid link of another page (old link or incorrect link entered ).

405 (method disabled) Disable the method specified in the request.
406 (not accepted) You cannot use the Content features of the request to respond to the requested webpage.
407 (proxy authorization required) This status code corresponds to <ahref = answer. py? Answer = 35128> 401 (unauthorized) </a> is similar, but the specified requester should authorize the use of proxy. If the server returns this response, it also indicates that the requester should use a proxy.
408 (request timeout) Timeout occurred when the server waited for the request.
409 (conflict) A conflict occurs when the server completes the request. The server must contain conflict information in the response. When the server responds to a put request that conflicts with the previous request, it may return this code and a list of differences between the two requests.
410 (Deleted) If the requested resource is permanently deleted, the server returns this response. This code is similar to the 404 (not found) code, but sometimes it is used to replace the 404 code when the resource exists before and does not exist. If the resource has been moved permanently, you should use 301 to specify a new location for the resource.
411 (valid length required) The server does not accept requests that do not contain valid Content Length header fields.
412 (not meeting the prerequisites) The server does not meet one of the prerequisites set by the requester in the request.
413 (the Request Entity is too large) The server cannot process the request because the request entity is too large to exceed the server's processing capability.
414 (the requested URI is too long) The request URI (usually the URL) is too long and cannot be processed by the server.
415 (unsupported media type) The request format is not supported by the request page.
416 (the request range does not meet the requirements) If the page cannot provide the request range, the server returns this status code
417 (expectations not met) The server does not meet the "expected" request header field requirements.

5xx (server error)
These status codes indicate an internal error occurred when the server processes the request. These errors may be server errors rather than request errors.

500 (internal server error) The request cannot be completed due to a server error.
501 (not implemented) The server does not have the function to complete the request. For example, this Code may be returned when the server cannot identify the request method.
502 (incorrect gateway) The gateway or proxy server receives an invalid response from the upstream server.
503 (Service unavailable) The server is currently unavailable (due to overload or downtime maintenance ). Generally, this is only a temporary status.
504 (gateway timeout) The server acts as a gateway or proxy, but does not receive requests from the upstream server in a timely manner.
505 (unsupported HTTP Version) The server does not support the HTTP protocol version used in the request.

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.