Skip to main content.

Google Duplicate Content Fix

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!

As an example, go to this website… Strippergrams and try removing the www. from the URL. Then try placing index.html at the end of the URL and you will see that the solution we mention below causes the page to always revert back to the correct URL… http://www.strippergrams.com.au/ Thats the URL we want Google to index.

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.


Here’s the code that will fix almost all canonical problems (a fancy name for what we’ve been talking about) on your site:

 

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.example\.com$

RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(([^/]+/)*)index\.html\ HTTP/

RewriteRule index\.html$ http://www.example.com/%1 [R=301,L]

</IfModule>

 

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!

More Related Articles From This Website...

Trackback URL for this post:
http://www.problogtips.com/google-duplicate-content-fix/2273/trackback/

Posted by Jaron in the catagory of... General Interest

Comments Off

This entry was posted to Pro Blog Tips on Thursday, September 27th, 2007 at 5:56 pm and is filed under... General Interest. Both comments and pings are currently closed.

Comments are closed.

Copyright © 2019, Pro Blog Tips | Design modified by Jaron