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!


The Discussion
Leave a Comment Read Again?← Previous Comments
I’m not sure where or how but Thesis takes care of this for you.
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
i used google webmaster tools to redirect all other forms to http://radfiends.com. try that also.
Can u plz tell me how you did in google webmaster tool. I can’t find out any option like this
can i redirect my old url to new one by .htacess file. how much changing url affect SEO?
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.
I also already did that with the google webmaster tools. Will this be enough, or i still have to update the .htaccess file.
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.
Great tutorial, but is it good for seo?
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.
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.
I usually use wordpress, and the theme handle this problem, but thanks for your tips, maybe for another framework this will work.
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.
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.
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 ?
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
Great tutorial, This is useful for me.
← Previous Comments
Comments on this entry are closed.