Over the course of this past weekend, I migrated content from one domain to another. My biggest concern regarding the migration was all of the backlinks that the site had received plus the Search Engine pointers which would exist for some time to come. Thankfully, I discovered two things which made the migration very easy.
First, I came across a plugin called Update URLs. This plugin created by Velvet Blues is really simple to use. Since I was moving my content from one domain to another and quite a few URLs within the content were hard coded to images, I needed a quick and easy way to simply replace the site URL. That’s exactly what Update URLs enables me to do as it provides a box for the OLD url and then the NEW url. Once I set that up, I click the button and like magic, all hardcoded site url links are changed.
My second tip is an htaccess modifcation that drove me bonkers until community member Mark McWilliams pointed me to an article which contained the exact bit of code I needed. What I wanted to do was make sure that if someone were to visit /articlename it would automatically redirect them to http://jeffc.me/articlename that way, all backlinks are kept in tact until the domain expires. While I’ll eventually lose some link love because not all backlinked sites will update the link, doing this provides me enough time to hopefully have Google change the URL in their search engine result pages
In the article, this is the bit of code which provided what I needed:
Redirect Old domain to New domain (htaccess redirect)
Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
This code works wonders and will buy the time I need to get my backlinks in order. Thanks Mark for helping me out and I hope this comes in handy for someone else down the road. Thanks to the WXR format or WordPress Extended RSS file which easily exports my comments, file attachments including images, posts, pages, etc, moving the actual content was the easiest part.