Is Your Site a Victim of URL Canonicalization?

  • 97 comments
  • Underlying Details
  • Read Summary

    Key Points

    • Files such as index.html, index.php, etc. return the same page, but will be looked at as two different pages by Search Engines.
    • URL Canonicalization can be achieved with some simple .htaccess edits (AKA, 301 Redirects).

    Summary

    URL Canonicalization is a very important, but very neglected step in SEO. Learn what URL Canonicalization is, and multiple ways to implement it on your website.

    Close

by Nicolas Prudhon

Often in SEO, there are some things you may miss that may ultimately have a negative effect on your site. Nicolas Prudhon goes over that “one thing” you may have overlooked while working on your site’s SEO.

You have been working so hard to optimize your site and yet you may have forgotten one thing. If you are any bit conscientious about the SEO of your site, you probably have a good keyword, a good page title, backlinks and so on.

Did you know that because of the one thing you forgot to do, part of that hard work is going to waste?

Take a few seconds to look at the following URLs:

  • http://www.mydomain.com
  • http://mydomain.com
  • http://www.mydomain.com/index.html
  • http://www.mydomain.com/index.php
  • http://mydomain.com/index.html
  • http://mydomain.com/index.php

If you are like most website out there, it is very likely that those 6 URLs actually return the same page.

As you do further analysis of your pages from the previous links, you’ll see that you may encounter different sets of backlinks and PR.

This is due to URL canonicalization

Indeed, to you and your visitors, all those links may resolve to the same page, but for the search engines, those are 6 very different pages. The decision is then left to the search engine as to which one it should show you.

In most of the cases, the URL returned will be the one with the most inbound and outbound links, thus the process is invisible to the webmaster in most instances.

The main problem about this when it comes to SEO is the simple fact that part of your efforts is leaked onto those different URLs.

In order for you to palliate to this problem, you must instruct the search engines that those URLs are in fact only one.

By doing so you’ll be able to optimize the SEO working efforts.

The process is done very simply by adding a few command lines to your .htaccess file as follows:

  • To redirect a http://mydomain.com to http://www.mydomain.com:
    RewriteEngine on
    RewriteCond %(HTTP_HOST) ^mydomain.com
    RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
    
  • To redirect your http://www.mydomain.com/index.html to http://www.mydomain.com:
    RewriteEngine on
    RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.html\ HTTP/
    RewriteRule (.*) index\.html$ /$1 [R=301,L]
    
  • To redirect your http://www.mydomain.com/index.php to http://www.mydomain.com:
    RewriteEngine on
    RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.php\ HTTP/
    RewriteRule (.*) index\.php$ /$1 [R=301,L]
    

Note: don’t forget to replace “mydomain” by your actual domain name.

What This Code Does

By adding those commands to your .htaccess file, you are telling the search engines that regardless of which of those URL is requested, they should take you to http://www.mydomain.com

The method used is called a 301(permanent) redirect. It is an extremely powerful SEO tool as any page moved or redirected by this mean doesn’t lose its value.

It may sounds a bit complicated and technical, but truly as far as you are concerned, it’s only a matter of copy and paste (and replacing “mydomain” with your actual domain name).

Congratulations, you now can enjoy full benefits from your SEO work!

Back to the top

by

To learn more about this author and see all of their posts, click below.

View Full Profile →

Discover the Real Meaning...

of what it means to master the psychology of your blogging practice. Find out one of the most missed aspects to blogging now, totally free!

Rob McCance December 21, 2010 at 2:26 am

I’m not sure where or how but Thesis takes care of this for you.

Thumb up 0 Thumb down 0
Amod Oke December 21, 2010 at 11:51 am

Hi,
All i wish to ask is do i have to write all the 3 above redirects one below other in a notepad file or is there any specific format??

Regards,
Amod

Thumb up 0 Thumb down 0
rfkid January 10, 2011 at 2:29 pm

i used google webmaster tools to redirect all other forms to http://radfiends.com. try that also.

Thumb up 0 Thumb down 0
Voiture occasion March 16, 2011 at 7:59 am

Can u plz tell me how you did in google webmaster tool. I can’t find out any option like this

Thumb up 0 Thumb down 0
Isha Singh January 22, 2011 at 1:03 pm

can i redirect my old url to new one by .htacess file. how much changing url affect SEO?

Thumb up 0 Thumb down 0
Silvano@JCPenney Coupons January 23, 2011 at 5:11 pm

I definitely was not aware of this URL canonicalization thingy and I guess this means I need to go back and check my sites one by one. This sucks but I guess I’ve gotta’ do it! Thanks.

Thumb up 0 Thumb down 0
wireless devices January 24, 2011 at 11:28 pm

I also already did that with the google webmaster tools. Will this be enough, or i still have to update the .htaccess file.

Thumb up 0 Thumb down 0
elektronines parduotuves February 7, 2011 at 5:23 pm

I definitely was not aware of this URL canonicalization thingy and I guess this means I need to go back and check my sites one by one. This sucks but I guess I’ve gotta’ do it! Thanks.

Thumb up 0 Thumb down 0
skyscraper@Business and Finance Corner February 9, 2011 at 10:18 am

Great tutorial, but is it good for seo?

Thumb up 0 Thumb down 0
Jaydip Parikh February 15, 2011 at 3:43 am

Even I wrote article on the same topic, few times back. canonicalization is really big problem as far as content duplication is matter. Our own site fight with us and we loose ranking. :(

Thumb up 0 Thumb down 0
Blake @ Logal SEO Texas March 1, 2011 at 10:16 pm

I was watching the Google Tips for Webmasters youtube videos the other day and they addressed this. Duplicate content penalty for something like this isn’t necessarily hurting your rank – that penalty is designed for multiple websites with the same content trying to spam.
What does hurt your rank is links going to each of the various pages. Instead of having all your “link juice” in one spot, it is spread out and less concentrated.

Thumb up 0 Thumb down 0
plan business February 15, 2011 at 10:56 pm

I usually use wordpress, and the theme handle this problem, but thanks for your tips, maybe for another framework this will work.

Thumb up 0 Thumb down 0
Kirsty February 27, 2011 at 10:43 am

Before I don’t know what URL Canonicalization means but after reading your articles, I realize that I stumble a lot of websites having this problem and I guess they don’t know that it actually create a problem and reduce their earnings.

Thumb up 0 Thumb down 0
Blake @ Logal SEO Texas March 1, 2011 at 10:23 pm

Wordpress actually handles canonical issues for the user, so most bloggers don’t have to deal with this issue. Wordpress also handles permalinks really well. If you have a site that isn’t wordpress hosted, then you might run into this. I do SEO for Dentist, and find that their sites frequently are indexed as both www and non-www.
Setting up 301 redirects as mentioned works really well most of the time, but sometimes things get tricky, especially on on query pages (like search pages). Google added a tag where you can specify which of the many variations you want Google to recognize. here is the code: Much easier than setting up 4 redirects for html, php, and the other various possibilities.

Thumb up 0 Thumb down 0
ashwin shahapurkar March 15, 2011 at 8:26 am

first of all thanks for this post. actually when i type myblog.com it redirects me to www . myblog.com …and i have not edited my .htcca file as you have said above. actually in my wordpress ..under settings …i have specified same url *(www. myblo.com) in both the fields: WordPress address (URL) & Site address (URL)

so is this valid ?

Thumb up 0 Thumb down 0
Ram March 22, 2011 at 7:43 am

Indeed a very helpful article on URL Canonicalization…Thank you for sharing it here….
was doing an R&D (URL Canonicalization) over for 3 days now….your article is simple to understand and very useful

Thumb up 0 Thumb down 0
Sign making supply April 5, 2011 at 10:40 pm

Great tutorial, This is useful for me.

Thumb up 0 Thumb down 0

Comments on this entry are closed.

Previous post:

Next post: