Friday, August 1, 2008

Does Your Site Have Canonicalization Issues?


http://www.yourdomain.com and http://yourdomain.com or 2 different sites in the eyes of most SERPs. You may have no control over how people link to you, be it with or without the www. A good test is to type this into Google:

site:yourdomain.com

Look at the results returned. Are you seeing both www and non www urls? If so this is no good. Make sure to notate how many pages are indexed. Another check after that is done is to type this into Google:

site:www.yourdomain.com

If you are seeing a different amount of pages returned then the first search you more than likely have canonicalization issues. The first thing is to log into your Google webmaster tools account and let Google know your preferred domain name. This is under the tools section in your account. The next thing you want to do is apply the .htaccess canonicalization fix.

Redirect Non-www to www code below that goes in your .htaccess file:

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

Redirect www to Non-www code below that goes in your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdoman\.com [NC]
RewriteRule (.*) http://yourdoman.com/$1 [L,R=301]

Don't be burned by letting the SERPs think you have duplicate content of your site on your own site. Make sure you make a backup of your original .htaccess in case you do something wrong. Try typing the opposite of what you want oin your browser to make sure it does redirect properly.

Related Posts by Categories



2 comments:

Manuel Merz on August 1, 2008 at 4:51 PM said...

Hey Soggy great post. I am never sure if you have to add that bit of code to your htaccess even if you set the prefered domain in the GWMT. Is this a "must do"?

soggy on August 1, 2008 at 4:59 PM said...

Google is just one search engine and what if something happened to GWMT? It takes just a minute to add to the .htaccess and then no more worries.

Followers

Twitter Updates

    follow me on Twitter
     

    Build A Niche Store Blog. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted by Bloganol dot com Privacy Policy