Redirecting WWW Or Non-WWW To Protect Your Domains Link Equity And Prevent Duplicate Content

October 8, 2009 · Leave a Comment  

Bookmark and Share

www-redirects

Using product domains as mini sites are a great way to monetize domains in your portfolio. Depending on your domain name the amount of type-in traffic may be large or small but it is usually consistent. Getting search engine traffic is another way to increase your traffic and income. Starting today and going forward I’ll be adding a series of short SEO (Search Engine Optimization) tips to this blog to help you make your product domain sites more search engine friendly to maximize your search results and traffic.

Todays tip is protecting your domains link equity and to prevent duplicate content by telling the search engines that only one version of your domain exists.

These two addresses are not the same in the eyes of search engine spiders even if they serve the same content:

example.com
www.example.com

By redirecting and combining www.example.com to example.com (or the other way around) you are telling search engine spiders that only one version of the domain should be crawled, indexed and ranked.

The following pieces of code should be placed in your sites .htaccess file depending on your usage:

How to redirect Non-WWW to WWW:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com
RewriteRule ^.*$ http://www.example.com%{REQUEST_URI} [R=301,L]

How to redirect WWW to non-WWW:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com
RewriteRule ^.*$ http://example.com%{REQUEST_URI} [R=301,L]

How to redirect Non-WWW to WWW:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com
RewriteRule ^.*$ http://www.example.com%{REQUEST_URI} [R=301,L]
How to redirect WWW to non-WWW:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com
RewriteRule ^.*$ http://example.com%{REQUEST_URI} [R=301,L]
Comments

Leave a reply