There is much confusion for some webmaster about how to make their site canonicalized for search engines optimization. We will take a look at where the confusion is coming from and how to take some simple steps to make sure your site’s pages are all canonical friendly for Google.
The two main issues that we hear about the most are:
- Should I use http://mysite.com or http://www.mysite.com?
- Should I use www.mysite.com or www.mysite.com/?
WWW VS non WWW
This one may be a no brainer for experienced SEO professionals, however you will find a ton of questions being asked about this one by newbies to SEO. If you ever wanted to know if Google looks at www. differently than non WWW. The answer is a definitive yes. It is possible that Google will look at these as two different sites that could potentially return two different results in the SERPs. This means that Pagerank (for those that care) can and will be distributed different depending on how you link internally and what your incoming links look like. If you want further clarification from the horses mouth, then read Matt Cutt’s blog post, SEO advice: url canonicalization.
Now you may not be able to control all of the incoming links to your site, but what you can do is make an absolute standardization on your site. This will ensure that all of your internal links and most of your external inbound links will get the maximum Page Rank, authority, and reputation with the least amount of watering down between different formats.
The key takeaway here is that it doesn’t really matter which method you choose, but you should choose one and stick with it. Personally I prefer to standardize on having a www on every domain I use. Now that you know why you should standardize, lets take a look at how to do so.
There are several methods available to you as a webmaster to tell Google how to handle this type of canonicalization within your site. Rather than use the link rel=”canonical” tag, I recommend using a simple .htaccess redirect that will ensure that all income requests to your site go one way or the other and you will consolidate all of your links on one standardized URL structure.
Copy and paste the code below into your .htaccess file and make sure to replace example.com with your domain!
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
Trailing Forward Slash or Not (/ vs nothing)
The second issue people seem to get confused about is how to handle forward slashes at the end of their root and inner pages. This is not quite as severe an issue as our first one was, but it can still cause loss of Page Rank and authority if you use both methods throughout your site. Before I get into any details I should state that I have several sites ranking perfectly with without taking the steps to standardize on the trailing backslash for all pages. While the average web master may be able to rank their site just find with a mixture of pages having a trailing slash and some not, we are SEO professionals and therefore will dot all our I’s and cross all our T’s
.
Since you are SEO, you may as well take the time to ensure that you have done everything in your power to consolidate your link authority as much as possible. It is my opinion that you should ensure that you do have a trailing backslash on every URL. The reason I recommend this is because some browsers will auto assign a backslash. So rather than standardize your site on having no forward slash, it’s just as easy to use one and make extra certain you are standardized no matter what browser is used.
Another simple .htaccess redirect can ensure that all pages displayed show the trailing forward slash at all times. In order to implement this on your site just copy the code below again into your .htaccess file ensuring to change the domain.com with your actual domain name!
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !example.php
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301]
some things you need to know:
The first line tells Apache that this is code for the rewrite engine of the mod_rewrite module of Apache.
The 2nd line sets the current directory as page root. But the interesting part is following now:
RewriteCond %{REQUEST_FILENAME} !-f makes sure that existing files will not get a slash added.
The line RewriteCond %{REQUEST_URI} !example.php exludes a sample url that shouldn’t be rewritten. This is just an example – if you don’t have any file or url that shouldn’t be rewritten, remove this line.
The condition RewriteCond %{REQUEST_URI} !(.*)/$ finally fires when a url doesn’t contain a trailing slash – this is all what we want. Now we need to redirect these url with the trailing slash:
RewriteRule ^(.*)$ http://domain.com/$1/ [L,R=301] does the 301 redirect to the url with the trailing slash appended for us. You should replace domain.com with your url.
So there you have it! Your site is now canonicalized well for Google. You are consolidating your internal and external link power to the fullest and Google should reward you for your attention to detail! Was this article helpful to you? If so or if not drop a comment and let us know!






Thank you so much !
Great Article
[...] The second stop this week is on a topic mostly overlooked that can make a difference in how Google counts your links. It is from Chris Burns at Search Engine Optimization X and titled “How To Make Site Canonical Friendly”. [...]
[...] If however you refuse to do anything unless the exact technical specifications have been laid out and all the facts have been presented, then Chris Burns of BurnSEO has a post for you. Chris has written a detailed post where you will find a more technical explanation of how to make your sites canonically correct at How to Make your Site Canonical Friendly [...]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^searchengineoptimizationx.com
RewriteRule (.*) http://www.searchengineoptimizationx.com/$1 [R=301,L]
Like that? or like this
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.searchengineoptimizationx.com/$1 [R=301,L]
And, why the "x" at the end of your domain name? Does Google ignore it?
I read (and I still have the pdf I read it from) that if an exact match domain
name was taken you could put a v or in your case an x at the end and Google would ignore or discount it.
Would that be true or false.
Thanks to Alex Whalley for the link to this page and thank you for the good information.
Thanks Chris, I had been wondering about the trailing backslash, however I didn't locate any useful information on the subject – until now. Cheers!
[...] have found a great article that very clearly explains this topic on http://www.searchengineoptimizationx.com and recommend it to you for further reading. This is an important issue for search engine placement [...]