A wrong way

Most webmaster uses following htaccess rule to move their website but this is a wrong way. This rule redirects each page on old domain to root of new domain (eg: http://olddomain.com/page.html to http://newdomain.com/) that affects indexed pages in search engine. This is not a SEO friendly way so I will not recommend it.

''RewriteEngine On

(.*)$ http://newdomain.com/ R=301''

SEO friendly way

Another way to redirect is page by page. Following rule redirects each page on old domain to same page on new domain (eg: http://olddomain.com/page.html to http://newdomain.com/page.html).

This is the best way also recommended by Google

''RewriteEngine on

(.*)$ http://newdomain.com/$1 R=301,L''