About a year ago, a discussion arose in the WordPress community about third-party sites that use the word “WordPress” in their domain name. We posted our opinion on this issue since WP Garage has been running (until yesterday) on a domain with the word WordPress in it. We put WordPress in our domain to show our ever-growing love for WordPress, but realized how important it is to the founders of WordPress that we take out their brand name, so yesterday we finally moved this blog to WPGarage.com instead. Come on over and take a look.
During the process, we had to do a 301 redirect from WordPressGarage.com to WPGarage.com in order to retain traffic from inbound links and search engines. It’s important in this type of situation to do a 301 permanent redirect so that all of the new pages on the new site are seen by the search engines as equivalent in terms of value and ranking as the old site.
We followed Yoast’s guide for how to Move your WordPress blog to a new domain in 10 steps! which was very helpful. However, along the way, we realized that there are a few things in his directions that might not be clear to readers (they weren’t so clear to us at times), so here are some things to pay attention to when doing a 301 redirect for a WordPress blog:
- Put the
robots.txton the new domain.
- Copy the database and files to the new domain.
wp-config.phpon the new domain to have the right database settings as described by Yoast.
- Now set up your new blog install, with the same settings as on the old domain. If you import the database it will retain pretty much all of your settings from the old site.
- The Search and Replace plugin for replacing instances of your old URL with the new one across your database works great.
- This step is fine.
- Yoast says to remove the
robots.txtfile. We left it but removed the slash after the word Disallow.
- The code Joost gives to put in your .htaccess file refers to a site moving from a sub-directory on one domain to a the root directory on another domain. It might not be clear what you need to use if you’re moving from the root directory of one domain to the root directory of another. So, on your old blog, add one of the the following lines to your apache
12345Redirect 301 /blog/ http://www.<strong>new</strong>domain.com/<em>This is if you're moving from domain.com/blog to domain.com</em><strong>OR</strong>Redirect 301 / http://www.<strong>new</strong>domain.com/<em>This is if you're moving from olddomain.com to newdomain.com</em>
- Joost says to remove the old blog and database. I’m not sure if I would do that so quickly.
- Change your FeedBurner account, if you have one, to pick up the correct feed and continue delivering it to subscribers..
Note: You can only change the Feed Title and Original Feed. You can’t change or “redirect” the Feed Address itself.
IMPORTANT NOTE: Don’t underestimate the importance of the slash and spacing. In Yoast’s example, we took out the entire /blog/ part of the line and the old site would only forward to the homepage of the new site. Luckily, we found this article which showed the importance of the slash placement.
Test it out and hope Google figures things out and displays your new site in the serps.
Update: After moving the site to the new domain, a few issues arose and were eventually solved, including issues related to Google Webmaster Tools, Google Analytics, and more. Read More on doing a 301 redirect of a WordPress site to a new domain for more info.