Web Design and SEO News and Tips » read post

Canonical Problems, Duplicate Content, & PageRank

  • August 25th, 2007

Here’s a simple problem that can cause major ranking problems on Google and other search engines. I mean simple in the sense that it doesn’t take much effort on your part to fix.

Question: Can your web site be accessed using both the www and non-www versions of your site’s URL? In other words, if your web site address is http://www.example.com/, can it also be accessed at http://example.com/? If the answer is yes, then you need to fix it NOW! First of all, it’s entirely possible that Google could be indexing both versions of your site and imposing a ranking penalty on you for duplicate content, because everything at http://www.example.com/ and http://example.com/ is exactly the same, but they are different URLs (i.e. different sites). You will also be suffering a PageRank dilution because your PageRank is being divided between these two URLs.

A similar problem exists if your home page can be accessed at http://www.example.com/ and also at http://www.example.com/index.html (or index.php, etc.). Google could be seeing these as two separate pages and penalizing you for duplicate content as well as dividing up your PageRank between those two.

Those linking to your site could also be linking to these different URLs, thus dividing up your incoming link juice into several URLs instead of one. NOT GOOD!

If your site is hosted on Linux or Unix running Apache (if you don’t know, ask your host), you can fix all these problems by adding a few lines of code to your .htaccess file. (If your site is hosted on Windows, switch to Linux/Unix right away!).

Here’s the code that will fix almost all canonical problems (a fancy name for what we’ve been talking about) on your site (click here for a text version to copy and paste):

Canonical Code

Make sure you replace every occurrence of “example.com” with your own domain name and if your home page is something different than index.html (index.php for instance), make sure you change that accordingly.

Your .htaccess file (if you have one) should be located in the root of your web server. Just open the file in any text editor (NotePad or equivalent on Windows, TextEdit or equivalent on Mac), add the code as described above, and save it back to your web server. If you do not have an .htaccess file at the root your web server, just create a blank text file in a text editor, add the code above, and then save it with the filename .htaccess and upload to your server.

Then watch your search engine rankings increase!

Comments are closed.