When I create a new website, one of the very first things I do is a simple trick with mod rewrite that let’s me tweak the site for better search engine optimization.
This tool I’ve created makes it easy to set it up so that
- Your website url will always have “www” in front of it
- Links with index.php or index.html will be rewritten so that the index is removed and the trailing slash is used
Some SEO gurus believe that this gives yours site an extra little bump by not being penalized for duplicate content. In short, you want all of your incoming links to a certain page on your site to appear to all target the same page.
There’s evidence to indicate that Google sees the following urls differently:
- http://yoursite.com
- http://www.yoursite.com
- http://www.yoursite.com/index.php
This tool requires you to have a web server running Apache and access to mod_rewrite.
All you do is enter your domain, hit the button, and you get some code you can copy and paste into your .htaccess directory (at the end) and you’re good to go.
As with any changes to your .htaccess file, make sure you do a backup before you upload the changes.
3 comments ↓
[…] RSS ← Canonical URL Tool […]
That is one cool tool. I found that I was having a problem on my sites, used your tool, and bam all fixed. Do you feel that when you are seeing this problem that google thinks or feels that it is dupe content???
Thanks
Steve
I’ve heard time and time again that Google treats content on www.yoursite and yoursite as different content and at the very least this hurts your page rank, link flow, link juice, link mojo, or whatever you want to call it.
And since it takes 2 seconds to fix, I do it.
Leave a Comment