Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
before the beginning of teaching, first explain the concept of "preferred domain", the so-called preferred domain, that is, the webmaster hope that the search engine used to index your Web pages indexed domain name, that is, the site's preferred domain name, so named preferred domain. Our usual site domain name is with www, in fact, the removal of the WWW is also possible, but for the search engine to make a choice. These two forms of domain name (with www and without www) in the search engine default to also point to the same site. But after the search engine and display stabilized, it will choose one of the domain name to display to the user, then this domain name is called the preferred domain.
In general, people in the domain resolution will be brought to the WWW and without the www are resolved to the home page, and when the search engine sees your site has this address all point to a page, the search engine does not know you want to advocate which address, especially some companies in order to protect the copyright of the domain name, and purchased a number of similar domain names , are resolved to the same space, so that the search engine lost, if this is our preferred domain name, so the weight of the site is concentrated in the preferred domain, improve the weight of the preferred domain, more conducive to the ranking of the site.
Since the preferred domain has an impact on the ranking of the site, let's simply say how to set the site's preferred domain
1, Google Webmaster tools have a set preference domain options
Select the tool in the Webmaster tool console, and then click Set preferred domain.
There are three options here: (Here we take A5 Webmaster network domain name admin5.com as an example to do a brief description)
1), the URL will be displayed as Http://www.admin5.com
2), the URL will be displayed as Http://admin5.com
3), do not set the associated item
The first choice is recommended. Generally now everyone in the input of a Web site will be brought to the WWW, suitable for people's habits.
2, 301 redirect settings preferred domain, to mention that the pure static site is not set to 301 redirect.
Take www.admin5.com and admin5.com as examples, I want to redirect admin5.com301 to www.admin5.com This domain name, set 301 Redirect, after the user enters admin5.com in the browser address bar, the address will automatically become www.admin5.com.
The code for 301 redirects under ASP is as follows
If request. ServerVariables ("server_name") = "admin5.com" Then
Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://www.admin5.com"
Response.End
End If
301 redirect Code under PHP
PHP Code:
if (($HTTP _server_vars["Http_host"]== "admin5.com") {
Header ("http/1.1 moved Permanently");
Header ("location:http://www.admin5.com");
}
3, there are some small skills to pay attention to.
General web site as far as possible using an absolute address, site links and outbound links are preferred domain.
[Concluding remarks] This article by the witty Love (blog Hi.baidu.com/qq637liu) original, starts in A5 stationmaster NET, reprint please indicate the source. At the same time, we also welcome you to come to exchange and suggestions. The completion of the article thanks to China 8U (8u.cn) Construction Station Technology Fan Jianwen Mr. Support and help, but also thank A5 Webmaster Network for our vast number of webmaster to provide a learning exchange platform.