How a simple .htaccess file can improve your SEO stategy
Did you know that search engines actually see your website as two separate sites? Yep… talk about duplicate content
See — you can actually get to any page on your site with either http://yourdomain.com/ or http://www.yourdomain.com. That’s two separate addresses and technically - search engines see that as two separate sites.
So there is potential here not just for duplicate content but also for page rank leaks… if you have inbound links to both addresses.
There is a really simple solution. You need to create a ‘mod_rewrite’ that redirects search engines, and users for that matter, from http:// to http://www. It’s easy to do, I’ll show you how.
Open up notepad and save the files as .htaccess (unless you already have that file in your root directory in which case add the following code to it).
Now paste the following code into it:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
You need to replace ‘yourdomain’ with your own.
Save the file and upload it.
That’s it. Now any time someone arrives at http://yourdomain.com they will be redirected to http://www.yourdomain.com. It does it for all of your pages not just the homepage.
Cool huh?
Here’s a hint too… before you create the file, make sure you don’t have it already. It’s a hidden file so you won’t see it in your ftp like you do other files. I use ws_FTP and with this program there is a little spot under ‘MkDir’ that you can type in. You type -a there and it shows the hidden files.
I’m not super techy so I can’t tell you much more then that… but hopefully you can figure it out
Add comment February 9th, 2007








