HTTP Status Codes 301 and 302 Concepts simple differences and enterprise application cases

Source: Internet
Author: User

The difference between HTTP status Codes 301 and 302 and enterprise application cases


1. What is 301 redirect?

301 Redirect/Jump generally means that this page is permanently transferred to another address.

301 is a permanent transfer (permanently Moved), SEO commonly used moves, will be the old page of PR and other information transfer to the new page;


2. What is 302 redirect?

The 302 redirect represents a temporary transfer (temporarily Moved), which is used when a Web page URL needs a short-term change.


3, 301 redirect and 302 redirect Difference

301 redirects are permanent redirects, and search engines also replace old URLs with redirected URLs while crawling new content.

302 redirects are temporary redirects, and search engines crawl new content and keep the old URLs. Because the server returns 302 code, the search engine thinks the new URL is only temporary.


4. Application cases of common websites

[[email protected] ~]# curl -s -o /dev/null -i -w  "%{http_code}\n " http://www.etiantian.org200[[email protected] ~]# curl -s -o /dev/null  -I -w  "%{http_code}\n"  http://etiantian.org    200[[email  protected] ~]# curl -s -o /dev/null -i -w  "%{http_code}\n"  http:/ /baidu.com200[[email protected] ~]# curl -s -o /dev/null -i -w  "% {http_code}\n " http://taobao.com302[[email protected] ~]# curl -s -o /dev/ null -i -w  "%{http_code}\n"  http://qq.com    302[[email protected ] ~]# curl -s -o /dev/null -i -w  "%{http_code}\n"  http:// jd.com302[[email protected] ~]# curl -s -o /dev/null -i -w  "%{ Http_code}\n " http://51cto.com301[[email protected] ~]# curl -s -o /dev/null -i -w  "%{http_ Code}\n " http://sina.com.cn301

For more information on HTTP status codes, please visit http://oldboy.blog.51cto.com/2561410/716294


This article is from the "Old Boys Linux Training" blog, make sure to keep this source http://oldboy.blog.51cto.com/2561410/1774260

HTTP Status Codes 301 and 302 Concepts simple differences and enterprise application cases

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.