View Full Version : How a simple .htaccess file can improve your SEO strategy
Thought this blog post might be of interest to some of the forum members...
SEO Tip (http://loriredfield.com/archives/36)
Audrey
03-14-2007, 07:28 PM
This is such an awesome post, I'm going to copy and paste it here:
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
I want to be super clear. The above is written by Lori, the owner of freelancemoms.com It's a post in her blog.
I wanted to share something I learned. I'm not techy at all. But what I learned is when you link to other pages on your site, make sure you link to the full url, not the short url. Does that make sense? Often you can just click on "link to" and then click the page you want to link to. Make sure you change the url of that link to be the full http://www.yoursite.com
Invest the time. Go through each of your pages and if you have a link on the page, change that link to be the full URL.
annesegal
03-16-2007, 08:56 PM
Hi Audrey and Lori,
Thanks a lot for the tip. I was wondering about that for quite awhile now. Every time I type mysite.com, the google tool bar would not show page rank. Now it will redirect.
redheadskater
03-19-2007, 07:15 PM
Very interesting Lori! I did not know that the http: and http://www. were considered two separate sites.
Thanks for the info!
vBulletin v3.5.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.