My family has been buying Mac's since I no longer do their Windows tech support. Now I'm Apple Tech support. Can't win.

SEO and .htaccess

I’m doing some SEO updates for a client, and have come across a tidbit of information concerning the way Google splits rankings among domains. My clients site currently has rankings under,, and Our SEO guy recommends that only be promoted, so that search rankings are not split between domains.

How did I go about this?

I started by looking at the .htaccess file for I noticed that there were not any 301 redirects.

Entering the URL without a ‘www’ should use a HTTP 301 redirect to Again, you want to work towards having one definitive URL for the site homepage to avoid rankings being split.

Most commands in .htaccess are meant to be placed on one line only, so if you use a text editor that uses word-wrap, make sure it is disabled.

This is how it looks in your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain\.com$
RewriteRule ^.*${REQUEST_URI} [R=permanent,L]

Now if you have other domains pointing to your main domain, you can use this:

RewriteCond %{HTTP_HOST} !$
RewriteRule ^(.*)$$1 [L,R=301]

this makes any other domain, such as, into

As you can see, alot can be done with the .htaccess file. For more info on this just Google 301 redirects or .htaccess.

Here is a great tutorial regarding the use of .htaccess.

One Response to “SEO and .htaccess”

  1. Thanks, that came in handy! I can never remember all those .htaccess rule off the top of my head.