This is the simplest and best SEO solution, with the least amount of effort, to redirect any domain alias or subdomain to your MAIN website domain name, and is achieved by using a .htaccess file in your website’s root directory. Any domain alias or subdomain will be redirected to the MAIN website.
NOTE: Keep in mind that the .htaccess file is a HIDDEN file, so you do need to make certain you can see hidden files before you accidentally write over it!
If the file does NOT exist, using a simple text editor, create a file named htaccess.txt with the these lines. If a .htaccess file exists, simply add these lines to the top of the file.
Options FollowSymLinks RewriteEngine on # IF NOT MAINWEBSITE. RewriteCond %{HTTP_HOST} !^www\.MAINWEBSITE\.com\.au$ [NC] # THEN redirect to MAINWEBSITE. RewriteRule ^(.*) http://www.MAINWEBSITE.com.au/$1 [L,R=301]
Where MAINWEBSITE is the main website name that you want to be visible as the URL or web address. Now upload the htaccess.txt file to your website root directory using your FTP programme, and then rename it to .htaccess
To test the redirects, simply enter one of your other “aliased” domain names into your browser and if everything is working correctly it should redirect to your MAINWEBSITE. If you get a error, then you have a mistake in the .htaccess file. The easiest way may be to delete the file and try again.
( www.redrook.com/?p=6335 )