The process of moving WordPress to a new domain – how it is done, what it means for your SEO rankings and how to survive it.
Basically it means creating a redirect and sending all traffic from the old URL to the new URL.
In essence, traffic “bounces” off your old site and lands on your new site. For example, after redirection, search traffic to http://oldurl.com/wordpress-redirect-post goes to http://newurl.com/wordpress-redirect-post.
With time, Google gives your new domain preference over the old domain in terms of SEO rankings. Here’s a small flowchart we drew:
Now, you shouldn’t take redirecting your domain lightly, especially where your SEO rankings are concerned.
If done right, you can keep or boost your SEO, but done wrong, you can lose your rankings or attract penalties.
While the prospect of redirecting your old domain to a new one seems scary, it turns out you can make the switch easily and without losing SEO juice.
Of importance to note is you might suffer a minor drop in search traffic after moving WordPress to a new domain, but this is often short-lived and a result of:
- Google takes time to index your new URL
- If you made significant content or design changes before the redirect, this new change might affect your SEO negatively until you put your house in order. At the same time, Google takes time to index new content
- Some users might ignore your new domain because of domain bias [PDF file]
All the same, this tutorial shows you how you can perform a successfully move WordPress to a new domain without hurting your SEO. Are you ready? Great, let’s drop the anchor and set sail.
Table of Contents
Why Move WordPress Site to a New Domain?
Before we dive in the process of migrating your WordPress site to a new domain, how about we look at some of the reasons businesses move URLs.
Rebranding is one of the main reasons why you’d perform a change of a domain name. As you work on your business, at some point you might discover you need to change direction completely, hence rebranding.
Rebranding oftentimes involves starting from scratch with a new business name and website. If you have amazing content, however, you simply need a new domain, properly set up redirect and perhaps a new site design.
Escaping Nasty Google Penalties
Recovering from Google algorithm and spam penalties is not for the faint-hearted. Usually, penalties come with a loss in search traffic, which means if Google hangs you out to dry, your SEO has little or no value at all.
If you have little or no traffic to begin with (see point above), doesn’t it make sense to start from scratch? If you don’t care one bit about search traffic, you can keep your old site, spam and penalties. We hope this doesn’t represent you.
Your New Domain is Catchier/Stronger
Perhaps you’ve had to make do with a .net, .club or .biz domain simply because the .com counterpart wasn’t available until now.
While a domain name doesn’t mean jack as far as SEO and the success of your business goes, a catchy domain name that’s easier to remember is great to have.
A stronger domain in your niche might save you a lot of time and troubles as you aim to reach your traffic goals.
HTTP to HTTPS Migration
Nowadays, Google has a soft spot for HTTPS with a number of people reporting an increase in traffic after switching from HTTP to HTTPS.
In the past, 301 redirects resulted in about 15% loss in traffic. Nowadays, Google treats 301 redirects differently, in that the redirects pass on all the link juice to the new URL.
Migrating to HTTP to HTTPS involves 301 redirects, just like moving to a new domain. The only advantage the latter has over the former is the little traffic boost Google accords HTTPS.
That said, please note switching to HTTPS is no child’s play, and done wrong, it can easily become an SEO disaster.
Oh by the way, a 301 redirect means a permanent redirect from one URL to another. 302 and 307 redirects are temporary redirects. It goes without saying, you should use only 301 redirects to redirect to a new domain.
If you’d like to consolidate your various websites under one domain, creating a redirect sites for each WordPress instance site is a no-brainer. The process is essentially the same whether you’re redirecting one or ten domains.
If done right, your new domain might rank well for the keywords on your other sites. By any means, you have to move the content on the sites to your new site and redirect appropriately.
You need to create a redirect from one domain to another if you’re discontinuing a product and would love to send traffic to a new product.
Think of what happens to your mail when you move to a new home but forget to alert the post office. You obviously lose a bunch of mail, right? In our case here, the lost mail represents lost sales.
Pro Tip: Switching domains is a risky venture, one you should undertake with your business goals in mind. The rationale here is to go for your business goals first, and SEO second.
How to Keep SEO Juice After Moving to a New Domain
Now that you understand you shouldn’t redirect your WordPress site on a whim, let’s go over the process of moving WordPress to a new domain like a pro and survive the SEO onslaught. Deal? Awesome, here’s the bird’s-eye view of this section:
- Create Full Backup of Your Old Site
- Clean Up Your New Domain
- Move Your Site to New Domain
- Rewrite .htaccess
- Fix broken links
- Notify Google
- Submit New Sitemap
- Change Domain in Google Analytics
Create Full Backup of Your Old Site
It’s a good habit to keep full backups of your site, whether or not you’re redirecting your WordPress site. Now, we won’t go into intricate details since we crafted a mega guide on how to backup your WordPress site.
Before you move your site, create a full backup because you need 1) a copy of your site to move to the new domain and 2) a backup in case something breaks during the move.
Clean Up Your New Domain
Obviously, we presume you have bought a new domain already. If it’s never been registered before, you can skip this step.
However, what happens if your “new” domain was registered in the past unbeknownst to you?
Perhaps you bought a site you’d like to redirect to your other domain. But how healthy is this new domain?
To ensure you’re not carrying forward any penalties and other nasties that might steal from your SEO efforts, you must check your new domain using Google Webmasters Tools (GWT).
How? Add your new domain to GWT and check the Manual Actions Page. If there are no issues, you can pop the bubbly as you have the green light to go ahead.
If there are manual actions, you have to make the necessary amendments and submit a reconsideration request.
Move WordPress Site to a New Domain
If you have a domain name that you’ve already associated to a hosting server, you’re a mile ahead of the guy who just bought a domain. This I say because moving a website from oldurl.com to newurl.com is not a matter of copy-pasting.
As long as you can put your domain on your hosting server (see this tutorial on how to point a domain name), moving your site is a matter of transferring your static WordPress files as well as the database.
If you had no idea your WordPress site has a database, you are better off with a plugin such as Duplicator or All-in-One WP migration. We also recommend checking out our WordPress migration tutorial. It shows how to properly migrate WordPress to a different host.
Add Redirect Rules to .htaccess
The best part of this guide, perfecting a redirect that saves your SEO is as easy as dropping a piece of code inside your .htaccess file.
As long as you’ve maintained the URL structure of your WordPress site (i.e oldurl.com/page-one-story redirects to newurl.com/page-one-story), redirecting traffic is a matter of editing the .htaccess file found within your web server.
Within the WordPress directory of your old site, locate the .htaccess file and add the following code at the bottom:
#Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newurl.com/$1 [R=301,L]
Replace http://www.newurl.com in the code above with your new domain name. This is known as a 301 redirect that tells Google and your users you moved your site from oldurl.com to newurl.com.
With this code in place, anyone who goes to some URL on your old site will be redirected to the corresponding URL on your new site. If this doesn’t happen, your redirects aren’t setup properly.
If you’d like to redirect any page individually, add the following code to your .htaccess file:
Redirect 301 /oldurl.com/page http://www.newurl.com/page
Replace oldurl.com/page and newurl.com/page with your old and new page URLs respectively.
Fix Broken Links
After moving your site to the new domain, you’ll most likely break a couple of links within your content. Links to internal pages, for instance, still have the old domain, which return 404 errors that are bad for user experience.
You might also inherit broken links from the old site, especially if you never fixed any prior to redirecting.
And as long as we’re talking about links, you must update as many incoming links as you can. Changing your URL on social media profiles you own is as easy as A, B, C.
Reach out to all website owners linking to you and kindly ask that they update their links with your new URL:
To cut back on the time Google takes to index your new domain, they (Google) offer a Change of Address Tool right within Google Search Console (previously called Google Webmaster Tools).
To use this tool, click on your old site in GSC. Next, click the gear icon in the top right:
Select Change of Address option from the drop-down menu to access this page:
Follow through with the 4-step procedure and finally hit the submit button.
Submit New Sitemap
If you had no idea, a successful move to a new domain also involves submitting a new sitemap to Google.
A sitemap is exactly what you think it is. It is a map of your site detailing various URLs to your content. Search engines use sitemaps to get a screenshot of your site for indexing purposes.
You can easily generate a sitemap using various WordPress plugins. Adding a sitemap to Google Search Console is easy.
Just go to your new site in GSC and navigate to Crawl -> Sitemaps:
Change Domain in Google Analytics
How does this affect my SEO rankings? You might ask. Well, SEO has everything to do with traffic generation, and the more you know about your traffic, the better you can re-align your efforts for maximal impact.
If you are still not using Google Analytics to track your WordPress site, you should start now. Google Analytics offers you plenty of useful information that you can use to improve your SEO at any given time.
If you already have Analytics set up on your WordPress blog, all you need to do is to change your property URL.
The process is fairly easy. Just login into Google Analytics and click the Admin tab and choose Property Settings. Now enter your new domain name in Website URL field and hit Save button.
Moving your WordPress site to a new domain without hurting your SEO is no easy task. All the same, it’s doable with a little elbow grease.
Note, however, if you had poor SEO rankings due to thin or low quality content, redirecting your site without fixing the problem won’t improve your rankings.
Just plan ahead, always create backups and be 100% sure the move is actually necessary.
It’s also important to notify your visitors of the move in advance. You can write a blog post, use a pop up or implement a transitional logo/byline to maintain brand recognition especially if you change your website design.
If you make changes on the new site, it’s best to redirect each page individually but you can see how that becomes a gargantuan task if you have a huge site. Best is to maintain same URL structure on the old and new site so you can make the switch easily using .htaccess.
Additionally, keep an eye out for previous redirects on your old site that might create multiple redirects on your new site and even a redirect loop error. For example, page A that redirects to page B on the old site will cause a three-step redirect on the new site i.e. page A -> page B -> page B on new site.
Keep in mind that it takes time to recover your SEO rankings after the switch. Switching to HTTPS has resulted in a boost in SEO rankings and traffic as seen in a number of case studies. Provided you do everything by the book, you should reach pre-move SEO levels in no time.
Finally, market your new site like your life depended on it to generate authoritative inbound links that boost your SEO rankings.
Have you ever switched domains? How did you manage the whole redirection business? Did you experience any problems? Please share with us in the comments.