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.