What is 301 redirection and ASP. net301 redirection code?

Source: Internet
Author: User
What is 301 redirection?

301 redirection (or 301 redirection, 301 redirection) is the header information in the HTTP data stream returned by the server when a user or search engine sends a browser request to the website server) indicates that the webpage is permanently transferred to another address.

Other common status codes include 200 indicating that everything is normal, 404 webpages cannot be found, and 302 temporarily switched.

301 redirection under ASP. NETCode

<SCRIPT runat = "server">
Private void page_load (Object sender, system. eventargs E)
{
Response. Status = "301 moved permanently ";
Response. addheader ("location", "http://www.izhufan.cn");
}
</SCRIPT>

Set in iis6.0 301

Internet Information Service Manager-> virtual directory-> redirect to URL, enter the target URL to be redirected, and select "permanent resource redirection ".

When to use 301 redirection

When a website has multiple domain names, 301 redirection is used to prevent the search engine from penalizing duplicate addresses. At this point, the optimization personnel should pay attention to the use of 301 redirection, mete forward redirect does not work. You must use 301 to switch to the search engine to think it is not a duplicate address.

301 stands for permanent transfer (permanently moved). 301 redirection is the best method for search engine friendliness after a webpage is changed. As long as it is not a temporary transfer, we recommend that you use 301 for the transfer.

 

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.