SEO Project #1 - www vs. non-www - Canonicalization - How Does Google See Your Site? - Update #4
Previous Post for This Project
I'm four days into taking daily action to getting my project site to rank. I've been learning quite a bit and have found a way to improve my project site each day. Today, I learned about can-on-i-cal-i-za-tion.
First, let me say that "canonicalization" isn't a word I would attempt to say in front of strangers. It has to many syllables and is too long. I live in the south and talk sloooow. Even if I could pronounce it, it would take forever for me to say it. Luckily, for this post I won't have to try. I'll just stick to writing it for now.
Q. What is canonicalization?
A. Canonicalization is the process of picking the best url when there are several choices. In most cases, it deals with your sites home page. Here are a few examples.
- www.example-site.com
- example-site.com/
- www.example-site.com/index.html
- example-site.com/home.asp
You may think these urls are all the same, Matt Cutts said, "But technically all of these urls are different. A web server could return completely different content for all the urls above. When Google “canonicalizes” a url, we try to pick the url that seems like the best representative from that set."
Q. Why do you care?
A. First, I wouldn't want to take a chance on Google viewing the www version and the non-www versions of my site as duplicate content. Another reason I can think of is the page rank leak. www.example-site.com and example-site.com can have different page ranks. Why not just use one version of the domain and combine the page rank into one.
Q. How do you fix this?
There are a couple of ways of fixing this problem and a few things you should do to avoid it.
1. Make a choice and stick with it. It doesn't matter if you choose the www or the non-www version of your site as long as you are consistent. Make sure the internal links in your site are consistent with your choice.
2. You can use Google Webmaster's Tools to make sure Google knows how to view your site.
3. Make sure to use the correct form in your sitemap.
4. I've added a redirect in my .htaccess file. I've chosen to use the www version of my site. With the .htaccess redirect in place, if a user visits example-site.com, they are automatically redirected to www.example-site.com
Here is the code I added to my .htaccess file.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example-site.com [NC]
RewriteRule ^(.*)$ http://www.example-site.com/$1 [L,R=301]
If you decide to use the non-www form of your site, just reverse the code.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example-site.com [NC]
RewriteRule ^(.*)$ http://example-site.com/$1 [L,R=301]
Other ways to do a 301 redirect
If you enjoyed this post, make sure you subscribe to my RSS feed!
Tags: .htaccess redirect, 301 redirects, Canonicalization, domain root, duplicate content, non-www, www







Voice Your Thoughts