301 Implementation Method of redirect

Source: Internet
Author: User
Tags add header domain domain name

Permanent page removal (301 redirects) is a very important "automatic steering" technology.

301 redirect can promote search engine optimization effect

From the perspective of Search engine optimization, 301 redirect is the most feasible method of Web site redirection. When the site's domain name changes, the search engine will only index the new URL, but also the old address under the original external link to the new address, so that the site will not be ranked because of changes in the URL to receive the slightest impact. Similarly, when you use the 301 Permanent redirect command to point multiple domain names to the site's primary domain, there is no negative impact on the ranking of the site.

302 redirect can affect search engine optimization effect

To date, only Google has been able to handle 302 redirects with exceptional capabilities. In other words, when the site uses the 302 redirect command to point other domain names to the primary domain, only Google will be the other domain name link scores into the main domain, while other search engines will only be linked to multiple domain name allocation, thereby weakening the main station link total. Since as a key factor in the ranking of the site of the number of the chain has been affected, the site rankings are also very natural things to reduce.

To sum up, in many redirect technology, 301 Permanent Redirect is the safest way, but also a very ideal solution.

For the correct implementation of the 301 redirect, there are several ways for you to refer to:

1. Add 301 redirect instructions in the. htaccess file

The use of "mod_rewrite" technology, in the form of:

Rewriteengine on
Rewriterule ^ (. *) $ http://www.williamlong.info/$1 [r=301,l]

2. For users who use UNIX network servers

Notify search engine via this instruction spider your site file is not under this address. This is a more common approach.

Shaped like: Redirect 301/http://www.williamlong.info/

3. Complete the 301 redirect in the system administrator configuration area of the server software

For users who use the window network server

4. Bind/Local DNS

If you have permission to edit the local DNS records, you can resolve the problem by simply adding a record. If you do not have this permission, you can require the Web site hosting service to set up the DNS server accordingly.

Settings for the DNS server

To point Blog.williamlong.info to Www.williamlong.info, you only need to add an alias record in the DNS service, which can be written as: blog in CNAME www.williamlong.info.

If you need to configure a large number of virtual domain names, you can write: * in CNAME www.williamlong.info.

This redirects all Williamlong.info records that have not been set to the end of the www.williamlong.info.

5. Implement 301 redirects with asp/php:

Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://www.williamlong.info/"

Header ("http/1.1 moved Permanently");
Header ("location:http://www.williamlong.info/");
Exit ();

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.