How to Redirect One Domain to Another Domain While Preserving SEO

I recently migrated mspwordpress.com to mspwp.com.  Using a WordPress plugin was an option, but it didn’t seem ideal, since I wanted to maintain all SEO stuff for all pages.  The solution was to use .htaccess as follows:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ http://www.mspwp.com/$1 [R=301]

Pretty neat, eh?

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress consultant, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and then to twitter.com/tobycryns and twitter.com/themightymo

Follow Toby's contributions on Github and WP.org.