In the process of website optimization, SEO tools often find a phenomenon: for example, the result of site: leoit.cn is higher than that of site: www.leoit.cn, which is very unfavorable to our website optimization, because the target website we are pushing is www.leoit.cn, and the increase in the indexing of websites without WWW will lead to the loss of website weights, how should we solve this problem, today, SEO tools explain a very important Seo technology, that is, permanent page removal (301 redirection). This technology has been around for a long time, but it is not very skillful, the following is a detailed description:
301 redirection promotes Search Engine Optimization
From the perspective of search engine optimization, 301 redirection is the most feasible method for URL redirection. When the domain name of a website changes, the search engine only indexes the new website and transfers the original external links under the old address to the new one, in this way, the ranking of websites will not be affected by changes in the website. Similarly, when you use the 301 permanent redirection command to direct multiple domain names to the primary domain of the website, the ranking of the website will not have any negative impact.
302 redirection affects Search Engine Optimization
So far, only Google has excellent processing capabilities for 302 redirection. That is to say, when a website uses the 302 redirection command to direct other domain names to the primary domain, only Google will include the link scores of other domain names in the primary domain, other search engines only share the link score to multiple domain names, reducing the total number of links on the main site. Since the number of external links, one of the key factors in website ranking, has been affected, it is also natural for websites to fall in rankings.
To sum up, among the many redirection technologies, 301 permanent redirection is the most secure and ideal solution.
For the correct implementation of 301 redirection, there are several methods for your reference:
1. Add the 301 redirection command to the. htaccess file.
The "mod_rewrite" technology is used, for example:
Rewriteengine on
Rewriterule ^ (. *) $ http://www.leoit.cn/#1 [R = 301, l]
2. Applicable to users who use Unix network servers
Use this command to notify the search engine spider that your site file is not under this address. This is a common method.
Shape: Redirect 301/http://www.leoit.cn
3. Complete 301 redirection in the system administrator configuration area of the server software.
Applicable to users who use Windows Network Servers
4. Bind/local DNS
If you have the permission to edit and modify local DNS records, you only need to add a record to solve this problem. If you do not have this permission, you can ask the website hosting service provider to set the DNS server accordingly.
DNS server settings
To direct the http://blog.leoit.cn to a http://www.leoit.cn, you only need to add an alias record in the DNS service, which can be written as: blog in cname http://www.leoit.cn.
If you need to configure a large number of virtual domain names, can be written as: * In cname http://www.leoit.cn.
In this way, all unconfigured records ending with William long.info can be redirected to the http://www.leoit.cn.
5. Implement 301 redirection using ASP/PHP:
ASP:
Response. Status = "301 moved permanently"
Response. addheader "location", "http://www.leoit.cn /"
Response. End
PHP:
Header ("HTTP/1.1 301 moved permanently ");
Header ("Location: http://www.leoit.cn /");
Exit ();
After the above processing by the SEO tool, you can compare the results of site: leoit.cn and site: www.leoit.cn after a period of time, and then you will find that your website has basically changed to www, try it now!
This article from: http://www.leoit.cn/archives/2035.html