Use. htaccess to implement Web site normalization

Source: Internet
Author: User
Keywords To

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

URL Normalization in SEO is a more important link, at the same time there are different versions of the Web site, not only may cause replication, but also can not correct the concentration of weight.





currently most Web sites, binding domain names are with the WWW and without two versions, and even many sites at the same time binding multiple domain names. After processing (jump, CNAME ...) may not have any impact on the visitor, see the same content, but for the search engine, it is not possible to determine which URL is the real home page.





controllable factors, site content links should be maintained in the same version, such as the whole station, return the address of the first page is a fixed version. But there is also an uncontrollable factor, is that others link to your site, the use of the Web site. A lot of spontaneous links or exchange links, others may omit the WWW, or use the binding of another domain name.





external factors are not controllable, we can control from the inside of the website. Using Apache. htaccess, use 301 redirects to standardize URLs.





Create a new empty file, file name. htaccess, fill in the redirection rules, and upload to the site root directory.





with 301 domain name redirection without www





Rewriteengine on


Rewritecond%{http_host} ^379.cc [NC]


rewriterule ^ (. *) $ http://www.379.cc/$1 [r=301,l]





uses 301 to redirect other multiple domain names that are bound to the primary domain name





Rewriteengine on


Rewritecond%{http_host} ^379.cc$ [OR]


Rewritecond%{http_host} ^bbs.379.cc$ [OR]


Rewritecond%{http_host} ^luoyang.cc$ [OR]


Rewritecond%{http_host} ^www.luoyang.cc$ [OR]


Rewritecond%{http_host} ^bbs.luoyang.cc$


rewriterule ^ (. *) $ http://www.379.cc/$1 [r=301,l]





of course, can also expand a bit, will index.html, index.php and so on also redirect:





Rewriteengine on


Rewritecond%{the_request} ^[a-z]{3,9}\/index\.php\ http/


rewriterule ^index\.php$ http://www.379.cc/[r=301,l]





can check the steering effect with this free tool:





http://www.internetofficer.com/seo-tool/redirect-check/

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.