I want to talk a little bit about canonicalization, www vs. non-www, redirects, duplicate URLs, 302 “hijacking,” etc.

canonical url

What is a canonical URL? Do you have to use such a weird word, anyway?

Sorry that it’s a strange word; that’s what we call it around Google.

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:





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.

How to Setup

Simple Open your .htacces file vai any ftp client application and add the flowing code:

RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www..+$ [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Note: This will add “www.” even if there is already a subdomain.

Affiliate Disclaimer : As an Amazon Associate I earn from qualifying purchases.