Read a lot of articles about HTTP status code are written very good very detailed, but read several times or not very good digestion, then with their own understanding of the common status code meaning comb out

Common status code

  • 1XX Informational (the request is being processed)

  • 2XX Success (Request successful)

  • 3XX Redirection Additional action is required to complete the request

  • 4XX Client Error (Client Error)

  • 5XX Server Error

  • 200 The OK request is processed normally

  • 204 The request was successfully processed but no resources are returned to the client (usually used when the client sends a message to the server)

  • 206 The response packet for a portion of a resource contains the entity Content specified by content-range

  • 301 Permanent Redirection If you save the URI corresponding to the resource as a bookmark, the bookmark will be saved according to the URI indicated in the Localtion header field

  • 302 Temporary Redirection Indicates A temporary redirect from old ADDRESS A to address B

  • 303 is similar to 301,302. When accessing a resource using the post method, the client is redirected to the corresponding URI in get mode and 303 status code is returned

  • 304 The resource is found, but the condition is not met. Therefore, the resource is not returned to the client. Often used for negotiating caches.

  • 400 Syntax errors exist in the request packet

  • 401 This status code indicates that HTTP authentication is required for the sent request. The browser displays an authentication dialog box after receiving the 401 response for the first time. If the second 401 status code is received, the first verification fails.

  • 403 The server rejects the resource access request because the file system access permission is not obtained.

  • 404 Requested resource not found or path error on server

  • 405 The request method is recognized by the server, but the server disallows the use of the method. You can use OPTIONS to see which access methods the server allows

  • The server fails to execute the request, usually because of a bug in the Web application

  • 502 Proxy server or gateway received an invalid response from upstream server

  • 503 The server is temporarily overloaded or down for maintenance and cannot process requests

Difference between 301 and 302.

Status code of 301 and 302 all redirection, said that after the browser to get the status code returned by the server will automatically jump to A new URL address, this address can be obtained from the response to the Location of the first (the effect of the user sees is he input address A moment into another address B) – this is that they have in common. The difference between them is. 301 indicates that the resource at the old address A has been permanently removed (the resource is no longer accessible), and the search engine will swap the old url for the redirected url while fetching new content. 302 means that the resource at the old address A is still there (still accessible). This redirection is only A temporary jump from the old address A to address B. The search engine will grab the new content and save the old url. Good SEO302 in 301

Redirection cause:

  1. Website adjustments (e.g. changes to the directory structure);
  2. The page is moved to a new address;
  3. Web page extension changes (e.g. application needs to change.php to. Html or. SHTML). In this case, if you do not do redirection, the old address in the user favorites or search engine database can only let visitors get a 404 page error message, the traffic is lost; Moreover some registered multiple domain name website, also need to access these domain name users automatically jump to the main site through redirection.