Random header image at Searchability

Is your website two-faced? (redirecting non-www to www URLs)

July 7th, 2009  |  Published in SEO, Tips  |  1 Comment

You may think your site has only one homepage, but search engines may think otherwise. Open www.(yourdomain).com in a browser. Then, open up (yourdomain).com, sans the “www.” Did the second URL redirect to the first? If not, then you have a two-faced website on your hands! While this may sound cool, Two Face is an SEO villain that you need to conquer.

Why should I care? You will spread your “link juice” thin. Let’s take, for example, the homepage of yourdomain.com. Let’s say you have 10 sites linking into your homepage: 5 to yourdomain.com and 5 to www.yourdomain.com. Rather than your homepage receiving 10 ounces of “link juice,” each version of your homepage will only receive 5. This could have a substantial negative impact on your homepage’s PageRank and rankability in general.

How can I fix it? Fortunately, there is an easy fix via the .htaccess file. Add the following two lines (replacing yourdomain.com with your actual domain name):

RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]

The first line says, “look for yourdomain.com without a leading subdomain.” The second line says, “301 redirect the non-WWW version to the WWW version.” Simple as that.

Of course, any edit to your .htaccess file can have big implications, so make sure you test it out before you leave it up on the server. Generally, this edit doesn’t cause problems.

Now you can call yourself the Bruce Wayne of SEO.

Responses

  1. Ed says:

    July 7th, 2009at 10:08 am(#)

    While popular usage tends to prefer the www, it is not uncommon to remove the www, forcing all top-level traffic to (yourdomain).com [e.g. slashdot.org].

Leave a Response

About Searchability

Searchability is the search engine marketing company of Jordan Teague . Subscribe via RSS »