Duplicate Content www vs. non-www Canonical Problems
Last updated: Jul 25, 2007The typical a domain usually starts with http://www and a subdomain would usually only contain the http://.; however, recently search engines have been marking http://yourdomain.com as an entirely different site from http://www.yourdomain.com. Meaning they get an entirely different ranking in Google searches. This means you may not be getting the page rank you deserve. In addition many people will often type into their browsers, “google.com” instead of “http://www.google.com”. I can understand this as it is way easier to type in google.com; although I think aesthetically http://www.google.com looks better and is the way it was meant.
These are the standard formats used for URLs
http://subdomain.domain.com http://www.domain.com
Duplicate content
When a spider crawls the internet looking for webpages to index into its searches it often keeps track of many attributes about each site it visits. Google for instance has an algorithm to determine if your website is more relevant than the next. Its spiders check the website for over 100 different things including whether or not your page has duplicate content. Since some search engines index http://yourdomain.com separately from http://www.yourdomain.com it’s important to let the search engine and your visitors know which domain you prefer to use. If you don’t, search engines may think that your entire page is full of duplicate content and punish your website by giving it a lower rank in searches. In some cases your web host may not even recognize the www. in front of your domain and may cause an error. This can be seen here. http://business.umt.edu vs. http://www.business.umt.edu
How can we fix the problem?
If your webhost is running Apache and it supports htaccess you can simply write the following code into a .htaccess file and place it in your root directory.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com$
RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
Examples of 301 redirects from the big sites
Redirect from http:// to http://www. http://microsoft.com >> http://www.microsoft.com http://google.com >> http://www.google.com http://yahoo.com >> http://www.yahoo.com http://ebay.com >> http://www.ebay.com
Sites that do not redirect http://youtube.com http://amazon.com http://myspace.com http://digg.com (this one really surprises me, as digg is heavily engaged in technology)
Since these examples are all sites from the top 10 websites most visited in the United States they don’t need to be concerned to heavily in page rank from Google.
Redirect subdomains with www. mail.google.com sfbay.craigslist.org
Need to print shipping labels on your site?
Checkout my product RocketShipIt for simple easy-to-use developer tools for UPS™ FedEx™ USPS™ and more.