Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
Many people in the Web site, will be a site for their own to register multiple domain names. For example, I registered the www.linkhelper.cn and www.adminlj.com 2 domain names for my link helper network. Perhaps a lot of people are accustomed to their own many domain names are all tied to a site. In fact, this is very unfavorable to the site, because the search engine will not know, which domain name is you want to promote a domain name. Cause the search engine will k off one of the domain name, and only keep a domain name, worse may be 2 domain names in search engines are not included. So, we need to guide the search engine, to tell the search engine, which domain name is your site corresponding to the main domain name. Therefore, it is necessary for us to do the secondary domain name 301 redirection settings.
In many cases, with WWW and two URLs without www, 8630.html ">" is sometimes used by search engines as 2 domain names. Next, I take the Web services of IIS as a prerequisite, to illustrate the 301 redirection settings.
There are 2 common 301 redirection settings I know. One is set directly through the IIS interface, and the other is through code to implement the 301 redirection settings. The following examples are explained in www.adminlj.com 301 Redirect to www.linkhelper.cn.
The first method, which implements 301 redirects through the IIS interface:
1. We add a site that binds the following host headers: adminlj.com www.adminlj.com linkhelper.cn. Note that the adminlj.com and linkhelper.cn here are possible to be used by search engines as different URLs without www and www. Corresponds to the directory E:\webroot\301web. The directory requires only 2 files, one Default.htm, one 404.htm. Screenshot below:
2.IIS Select the site that we have just established, right button, properties, home directory, select Redirect to, enter URL: http://www.linkhelper.cn, also note that the following resources are selected for permanent redirection. Screenshot below:
3. To this end, we have completed the linkhelper.cn www.adminlj.com these several domain name 301 Redirect to www.linkhelper.cn. But generally, we may have previously advertised the domain name without the WWW, leading to search engines have included a number of linkhelper.cn under the Web site, so in order not to waste these included, we need to transfer these from the search engine traffic to www.linkhelper.cn. So how do we do that? Can be achieved by 404+301. Then we set 404 information on this site. IIS interface, right button, properties, custom error, find 404, double click, come out an interface, then select the URL in the message type, and enter/404.html in the URL input box below. Then we re redirect the 404.html to the http://www.linkhelper.cn under IIS. Action steps with step 2nd. In this case, if the user entered linkhelper.cn/xxx.html and the like, because can not find, it will go to 404.html, and through 301, the user will eventually enter http://www.linkhelper.cn the interface.
With the above steps, we have completed the 301 redirection settings in IIS. But in most cases, webmasters are using a virtual host, so that you can not use IIS to set 301 redirects.
Then we can do it in the second way: through code. The procedure is as follows.
1. With the Setup method inside the IIS first step, you need to add the site directory, and bind the domain name adminlj.com www.adminlj.com linkhelper.cn these three domain names. and add default.asp and make sure Default.asp is the first default document.
2. Modify the code in the Default.asp. The code is:
This enables 301 redirects with ASP.