Review HTTP Status Codes +301 and 302

One, HTTP status code:

1xx: (information status code), the accepted request is being processed.
2xx: (success status code), the request is processed normally.
3xx: (redirect status code), additional action is required to complete the request.
4xx: (client error status code), the server was unable to process the request.
5xx: (server error status code), the server has an error in processing the request.

Second, explain the difference between 301 and 302 jumps in detail:
301: Permanent redirection. Indicates that the requested resource has been assigned a new URI, and the search engine should also replace it with the new URI.
302: Temporary redirect. Indicates that you want this request to use the new URI for access.
303: 303 is similar to 302, but 303 clearly indicates that the client should use GET to obtain resources.

301 and 302 will have different effects on SEO. For example, A jumps to the B website. 301 optimize B website, 302 optimize A website.
In detail, the 301 and 302 status codes both indicate redirection, which means that the browser will automatically jump to a new URL address after getting the status code returned by the server,
which can be obtained from the Location header of the response ( The effect the user sees is that the address A he entered is instantly changed to another address B) - this is what they have in common.
Their difference is. 301 indicates that the resource of the old address A has been permanently removed (this resource is inaccessible), and the search engine also exchanges the old URL with the redirected URL while crawling the new content;
302 indicates that the old address of A The resource is still there (still accessible), this redirect is just a temporary jump from the old address A to the address B, the search engine will crawl the new content and save the old URL.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325526918&siteId=291194637