Change your WordPress domain with 301 redirect

When you change your WordPress domain and want to redirect your old URLs and keep your PageRank, add the following to your .htaccess file.

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !newdomain.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]

Thanks to this post.