simple solutions for complex problems
Tips » How to redirect a whole site with htaccess
You can redirect an entire domain name by placing a file called .htaccess with the following text into the root of your old domain:
Note this will only work on Linux hosts (the majority). If you are using a Windows host you will need to set up a 301 redirect with Sitemanager. Ensure you use the 301 status code as this will preserve google rankings.
RewriteEngine On
RewriteBase /
Rewriterule ^(.*)$ http://www.example.com/$1 [R=301,L]