-
-
Rafeef Ziadah – ‘We teach life, sir’, London
November 17, 2011 By Khuram -
31 Top Recruitment Agencies in Dubai
August 20, 2011 By Khuram -
A Blind knows the meaning of Darkness – Most Touching Video
August 19, 2011 By Khuram -
Riddles of Marriage: “The Pendulum Effect”
September 16, 2010 By Rehan -
BBC Analysis again Burning Quran Controversy
September 08, 2010 By Khuram
-
race suits: You are doing a great job of writing to your reade »
-
dating singles: You've managed to write a great informational arti »
-
music class: It's an honor to read high quality content these d »
-
financial attorney dallas: I feel a little self-conscious writing a comment w »
-
burbank movers: The ability to write a great informative article i »
-
Tag Archives: Web Development
Quick SEO Tip: URL canonicalization and 301 re-dirrect
Canonicalization is the process of picking the best url when there are several choices, and it usually refers to home pages. For example, most people would consider these the same urls:
www.example.com
example.com/
www.example.com/index.html
example.com/home.asp
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.
It does not matter if you pick proper URL canonicalization pointing to the www’s or non-www’s, but you need to pick one and stick to it. I personally always choose the www’s because more people (from my experience) tend to link to you with the full URL.
Why canonicalize?
Its all about SEO. As you know linking is most important SEO activity. If two sites are linking you, one at wisacc.com and one at www.wisacc.com, Google will consider then two seprate pages, and your home page will not reap the benefit of two links. So be sure that any variation of the homepage URL needs to be redirected to one URL, whichever you choose.
Any extension of your URL like:
• http://www.example.com/index.php
• http://www.example.com/index.htm
• http://www.example.com/default.html
• http://www.example.com/default.php
• http://www.example.com/anything (that goes to homepage)
All need to be pointed to the main – http://www.example.com (without any extensions). You also need to make sure that you don’t have any dev links that need to be 301-ed to their new addresses so you don’t have any bad or dead links on the site.
How to canonicalize?
You can handle all these changes via the .htaccess file. Here is a little code that can help you:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
(Make sure your Apache installation has mod_rewrite enabled.)
As long as your Apache installation has mod_rewrite enabled then you should be able to use this fix on almost any host.
Note: use these two lines to redirect all variations of home page seprately.



