The answer: a 301 redirect in your .htaccess file. If that doesn’t make sense to you, don’t worry—it’s not as complicated as it seems. But it is the best solution for retaining your inbound links and your precious search engine rankings while moving your WordPress site (or any site) to a new directory or domain. A server-side 301 redirect is the kosher way to tell browsers that the site has moved permanently and is the most ethical and effective method for SEO purposes. Most importantly, Google understands it and won’t penalize you for the move in their search engine rankings. Here’s how you do it:

Step One

Move your WordPress site, if you haven’t already. Don’t worry about leaving your old site behind—in fact, don’t, since this result in duplicate content issues. Keep your old directory there, but leave it empty.

Step Two

Navigate to the old directory and look for an .htaccess file. This would be the root of your old WordPress installation.

If it doesn’t exist, then create it in Notepad or another plain text editor. Make sure you name it just like that: .htaccess with the dot in front, as if it were a file extension with no filename. It it does exist, open it.

Step Three

If there is anything in your .htaccess  file, delete it.

Step Four

At the top of your .htaccess file, insert the following code: Replace the red text with your domain and directory path, if necessary. For example, if I were moving my site from jantonbusch.com/pop to jantonbusch.com/princeofpretzels, I would use the following: Don’t forget to include all that junk around the URL, including the $1 and the text in the brackets.

Step Five

Upload or save your .htaccess to the root of your old WordPress location.

Step Six

Test out your 301 redirect. Try visiting a deep link on your old site and make sure it forwards to the corresponding page at your new location. If you don’t have an old link handy, just navigate to page other than the homepage on your new site and then swap out the old domain or directory path to test it.

Conclusion

A 301 redirect is the best way to retain your inbound links and SEO juice when moving domains. Of course, it’s a temporary fix—you should encourage anyone sending you links to update their links with your new address, if possible.  But for the time being, a 301 redirect is a good way to transition to a new location. If your move is temporary, use a 302 redirect (swap out R=302 where R=301 appears). If you want to get demoted for spam, use a browser-side META redirect. Good luck Comment Name * Email *

Δ  Save my name and email and send me emails as new comments are made to this post.

How to Redirect Inbound Links After Moving Your Wordpress Installation - 44How to Redirect Inbound Links After Moving Your Wordpress Installation - 70How to Redirect Inbound Links After Moving Your Wordpress Installation - 98How to Redirect Inbound Links After Moving Your Wordpress Installation - 53How to Redirect Inbound Links After Moving Your Wordpress Installation - 86How to Redirect Inbound Links After Moving Your Wordpress Installation - 65How to Redirect Inbound Links After Moving Your Wordpress Installation - 61How to Redirect Inbound Links After Moving Your Wordpress Installation - 62