Search Engine Optimization Blog

URL canonicalization and SEO

In SEO, Generally people put all their effort in building back links, gaining higher relevancy and other SEO factors and overlook URL canonicalization, which may cause negative effect on website ranking.URL canonicalization, can be defined as process to have standard consist URL. For example , Have a look at following URLs

http://www.example.com
http://example.com
http://www.example.com/index.html

People think these are same URL. They may result show same content but for search engines they are different , Search engines treat them as different pages and show up the page with maximum number of inbound and outbound links, that gonna further leak out your effort in building back links.
In order to overcome this , One need to instruct search engines about which URL should be picked and concentrate on that URL in link building . There are several ways to do, best one in 301 redirect, that can be easily done using .htaccess file in PHP based sever, Unfortunately IIS server don’t support .htaccess (but you can redirect from service manager)
Lets discuss 301 redirect with .htaccess
non www to www redirect
In order to redirect http://domain.com to http://www.domain.com, Put following code in .htaccess file

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

www to non www redirect
In order to redirect http://www.example.com to http://example.com, Put following code in .htaccess file

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

http://www.example.com to http://www.example.com/index.html redirect
Put following code in .htaccess file

RewriteEngine on
RewriteCond %(THE_REQUEST) ^[A-Z] {3,9}\ /.*index\.html\ HTTP/
RewriteRule (.*) index\.html$ /$1 [R=301,L]

Other prominent way to redirect is using refresh metatag (introduced by Netscape) , this specify to new page after some set time. Time 0 indicates permanently redirection. For example

But sometimes , using meta refresh can causes detrimental effect as well, as sometime search engine may consider it as a spam because this technique very often used by spammer to trick search engines.
You can also redirect using java script.I personally believe .htaccess redirect is most efficient way, Actually it depends upon one’s need so weigh all the pros and cons and choose the way suitable to your requirement.
Happy SEOing,
Upen

http://www.freesearchengineoptimizationtools.com

April 28th, 2010 Posted by icebreaker | SEO | one comment

1 Comment »

  1. yeah, you are very true. I also implemented it on my website

    Comment by web design montreal | July 12, 2010

Leave a comment