WordPress users - sharpen your URLs with Google!
Update: October 1, 2009
This article is from january 2006. In new versions of WordPress all the things in this article is being taken care of automatically. DO NOT USE IT ANYMORE.
First of all you must enable the permalinks, but that you probably already have done.
Now to the point. Did you know that these are all different URLs for the same blog post?
http://www.myblog.com/my-blog-post http://www.myblog.com/my-blog-post/ http://myblog.com/my-blog-post http://myblog.com/my-blog-post/
Google sees this as 4 different URLs and 4 different pages when in fact it is only one. One of them will rank higher in Google than the rest. This is called canonicalization problem and is discussed by a Google staff here.
Let's say you get a nice link to http://www.myblog.com/my-blog-post but in fact it is http://www.myblog.com/my-blog-post/ that ranks higher. This link is useless in terms of ranking!
The solution to get all 4 versions made into only one and to have all weight/power transferred to that one
Add the following lines in the .htaccess file before the WordPress permalinks lines:
Options +Indexes
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^myblog.com
RewriteRule ^(.*)$ http://www.myblog.com/$1 [R=permanent,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !(.*)/$
RewriteRule ^(.*)$ http://www.myblog.com/$1/ [L,R=301]
That will make all posts go to this version: http://www.myblog.com/my-blog-post/
Just replace myblog before you add it and don't forget to still include the WordPress permalinks section in the .htaccess file.
Let me know any feedback, ideas, comments etc.
Update, November 28 2006
If this does not work or you use the non-www version for your blog you should use the solution provided by Christer Edwards on the comment here.
Other posts
- My Recommendations for a Happy Life
- Budget 100 - an old school magic format
- My Favorite Board Games and How I Play Them
- Switching from Windows PC to Mac and why I switched back
- Creating The Space War - The Card Game of My Dreams
- 24 Characteristics That Geniuses Have in Common
- Setting up and Managing a MySQL Server
- Canasta - The Great Card Game
- Annual report number 13 + 14: My Success
- Selling my SEO business TodaysWeb
He is the Founder of DomainStats and N.nu. Read his full about page.