Several methods of implementation of 301 redirects

Source: Internet
Author: User
Keywords 301 redirect

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

What is a 301 redirect?

Usually we will encounter in the website construction like: The website revision, dynamic static, the website after the relocation structure adjustment and so on, in these cases, if does not do 301 redirects, that user accesses the original address will prompt 404 error page information directly, Very detrimental to the user experience. So in these cases we need to do 301 Redirect, 301 redirect It is mainly the Web page change the address of the search engine the most friendly way, in the SEO perspective, 301 Permanent redirect can increase the weight, The weight of the original page is concentrated to one address. It is very advantageous to the page weight promotion.

301 Redirect Effect Example: In the Address bar input: Adminseo.net can see the automatic jump to www.adminseo.net the effect is 301 redirect

How do I do 301 redirects?

301 redirect Although good, but it has certain limitations, in addition to the above mentioned in several cases to do 301 Redirect, the other need to consider is that our site hosting the host space to support 301 redirect.

Usually we buy the host space is the most commonly used in Windows and Linux two kinds of systems, the following will be said in both cases to achieve what conditions to do 301 redirects, and how to do 301 redirect.

1, the Linux host is generally using Apache servers, such hosts need support. htaccess can do 301 redirects.

If you support. htaccess, how do you do 301 redirects?

First of all 2 domain names with www and no www are resolved to our host IP address, then add the following rules at the beginning of the. htaccess file:

Rewritecond%{http_host} ^adminseo.net [NC]

Rewriterule ^ (. *) $ http://www.adminseo.net/$1 [r=301,l]

2. Windows hosts typically use IIS servers that are required to install Isapi_rewrite This component (that is, usually using the most of the pseudo static environment we call it), and if so how do we support 301 redirects? Do not support us and how to deal with it?

If the Isapi_rewrite component is supported, the first 2 domain names with www and no www are resolved to the IP address of our host, and the following rules are added at the beginning of the Httpd.ini (usually called pseudo static rule file) file:

Rewritecond Host: ^adminseo\.net$

Rewriterule (. *) http\://www\.adminseo\.net$1 [r,i]

If the Isapi_rewrite component is not supported, it can only be done through IIS (suitable for your own server, or for the virtual host provider to help resolve), as follows:

First, create a new Web site under IIS, the Site directory (available from the original site folder can also create a new folder, arbitrary) only need 2 files: Default.htm and 404.htm, the new site host header binding needs to do 301 redirect URL, as shown above: Admiseo.net need to do 301 to www.adminseo.net on the new Web site's host head bound adminseo.net, new after the completion of the new Web site Right-click, select Properties, select the home directory in the property panel, as shown in the following figure, select Redirect to URL , and then enter the URL, do not forget to "resource permanent redirect" option on the hook Oh!

  

Reminder: The author in doing 301 redirect found online articles are not new site this, making many novice friends less operation of the new site this step, resulting in 301 redirects after the site can not open the situation. Please pay attention!

PostScript:

If the webmaster is not supported 301 redirect host, the author also recommended two methods for everyone, but also to achieve the purpose of search engine friendly

1, if it is a new domain name and site, no WWW domain name has not been included in the search engine, then you can use the way to forward the URL, without the domain name of the WWW to the domain name with www, in the domain name management background can be set forward, It is noteworthy that at present some of the domain name registrars have made certain restrictions on the URL forwarding.

2, if the site has been online for a long time, not with the WWW domain name also included a lot, then the site's navigation, classification, columns and so some of the more important places as far as possible using the absolute address with www

Absolute address (i.e. absolute path): http://www.adminseo.net/Seo-jishu/220.html like this

Relative address (i.e. relative path):/seo-jishu/220.html like this

Changsha SEO original article, A5 Initial source adminseo.net reproduced please specify the source. Thank you!

Related Article

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.