How to move domain without losing SEO or subscription payments
I recently rebranded this website, moving from one domain to a new domain. In doing so, I had three major concerns:
- I’d lose all the SEO value I’d built up over the years for the previous domain – and therefore all the traffic I get from search
- I’d no longer be able to collect recurring payments for plugins purchased from the site on the old domain
- Users would not be able to get automatic updates for new versions of products
This is a step-by-step account of everything I did to ensure that my worst fears weren’t realised.
Why move a site from one domain to another?
In my case, I was rebranding my business from WordPress themes and plugins to one that was focused on just plugins. For this reason, it didn’t make sense to use the old name (Catapult Themes) or the old domain name (catapultthemes.com). So I felt that a move to a new domain was unavoidable.
Essential reading before you make the leap
Maintaining your position in search results
Initially, I wasn’t certain whether it was even possible to move a domain and keep all the SERPs. As it turned out, Google have a process for exactly this. The change of address tool allows you to notify Google through the Search Console that you’re moving your site from one domain to another. Google will help you manage this transition.
I also recommend some further background reading on some of the actions you’ll need to take to ensure that you don’t lose any search engine rankings:
- Moz’s guide to properly moving your domain is over 10 years old but still covers the basics
- I found this article to be a really in-depth guide to keeping your rankings when moving domain
Migrating an Easy Digital Downloads store to a new domain
I use Easy Digital Downloads to sell my products. Customers have a choice of two payment methods: either credit or debit card using the Stripe gateway or through PayPal.
EDD Recurring Payments
In addition, I use the EDD Recurring Payments plugin to take subscription payments. This means that customers pay an annual fee to keep using my plugins.
When I decided that I wanted to move to a new domain, I was concerned that I wouldn’t be able to take any recurring payments that had been initiated on the old site. Obviously, I don’t want to lose this income.
Software Licensing
To compound matters, I also use the Software Licensing extension to manage users’ licence keys and, crucially, to provide users with automatic updates. I didn’t want any user who had purchased a product from the old site to find they could no longer receive automatic updates.
Covering all these concerns, there is a useful article on the Easy Digital Downloads support on migrating an EDD store to a new domain. This covers how to update your payment gateway’s settings, what to do if you’re using the Recurring Payments extension, and how to manage licences with the Software Licensing plugin.
Moving your domain without losing SEO
I’ve outlined below the steps I took to move my site from one domain to another. I cannot emphasise enough the importance of planning this in advance.
It’s worth reading through these steps before you start any migration, particularly as you’ll need to have some plugins downloaded and ready.
Before migration
This is the process I used to move my site from one domain to a new domain.
Create a new theme
I was rebranding, not just changing name, so I exported my site (see below) then installed it locally. This way, I was able to take my time developing the new theme and testing out any new functionality that I wanted.
Make a list
I kept a record of every change I made on my local version so that I’d be able to implement them on the new site as quickly and efficiently as possible.
When you’re ready with your new theme, it’s time to think about the migration. I planned mine for a Saturday morning because there are fewer visitors to the site then – and it would give me all weekend to fix any problems, should they arise.
The migration process
Once you’re totally prepared to make the move, then it’s time for the migration process itself.
Put the old site into maintenance mode
I wanted to ensure that I was going to export an exact snapshot of the old site. I anticipated the migration taking around an hour or so and I didn’t want any customers coming along and purchasing a plugin from the old site before I’d completed the migration. So I used the Coming Soon plugin to put the site into maintenance mode.
Export the old site
Once the site was in maintenance mode, I used the WP All In One Migration plugin to create an export file. There are several plugins you could use for this, including WP Migrate DB Pro and Duplicator; however, I have found the All In One plugin to be the simplest and least risky.
It’s likely that you’ll need an extension for All In One to account for the size of your export file. I strongly recommend checking this out before you start the migration.
I also recommend doing a dry run for your export / import. You can do this without putting your site into maintenance mode because it’s only a test run. But it will help enormously in finding any configuration issues before you do the real thing.
Import the site to the new domain
Ensure that you’ve installed WordPress, the All In One plugin and the Coming Soon plugin on your new domain. Import your All In One file.
Once imported, you have an exact replica of your old site, now on your new domain. Use the Coming Soon plugin to put the new site into maintenance mode.
Upload your new theme
Once you’ve imported the old version of the site, you can do all your updates to the theme. Because I’d worked on the new theme locally, I had it ready to go along with a list of all the configuration changes I needed to make once it was activated on the new site.
Install any plugins
There were a couple of additional plugins that I needed to install on the new site. Now is the time to do that.
Update payment gateway settings
Stripe
Using Stripe with EDD, I needed to:
- Create a new webhook in the Stripe dashboard
- Delete the webhook pointing to the old site
- Go to the Stripe settings for EDD and insert the same API keys I’d been using on the old site
Paypal
For PayPal:
- Change the IPN Notification URL so that it points to the new site: https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-ipn-notify
- Get a Payment Data Transfer token
- Ensure your PayPal email address is correct in your EDD settings
After the migration
With the migration complete, you can do some testing on the front end to ensure that everything looks and works as expected. If you’re happy, then you can move to the next phase.
Setting 301 redirects
This is a biggie. A 301 redirect will automatically send anyone from your old site to your new site. It’s also a permanent redirection, meaning you can’t take it back.
Remember that once you implement a 301 on your old site, you won’t be able to access the back-end of your old site.
There are a couple of different methods to set your 301 redirect:
- On the server: if you’re using cPanel, check out this article on setting a 301 redirect.
- Through your .htaccess file: I used the following conditions in the .htaccess file on the old site to redirect users to the new site:
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR] | |
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$ | |
RewriteRule ^(.*)$ "https\:\/\/newdomain\.com\/$1" [R=301,L] |
Note that, in my case, I was retaining the same permalink structure so I used a ‘wildcard’ redirection. This means that if a user tries to access olddomain.com/this-page they’ll be redirected to newdomain.com/this-page.
A wildcard redirect is the simplest way to do this.
Take the new site out of maintenance mode
With your new site in place and the redirections set up, it’s time to launch. Take the new site out of maintenance mode. Now, anyone going to your old site will get redirected to the corresponding page on your new site.
Using Google’s change of address tool
The biggest step in maintaining your SEO is to tell Google what you’ve done. You do this through their change of address tool. Follow these steps after you’ve created the redirects and you’ve launched your new site:
- Create a new Google Search Console account for your new site
- Verify your new site – this will ensure that Google knows about your site and knows that it’s yours
- Go to the Google Search Console account for your old site
- Use the change of address tool to specify the address of the new tool
- Go to the Google Search Console account for your new site
- Submit a sitemap (if you’re using a plugin like Yoast, this is pretty simple)
How long does a Google change of address take?
Once you’ve notified Google that your site is moving, it will take several days to over a week to fully update its index. Some pages are re-indexed quicker than others.
As far as I could see, there wasn’t a noticeable reduction in traffic or search position for any of my pages. I regularly checked certain search terms to see which site appeared in the results. Sometimes it was still the old site (which was fine because any user was just redirected to the new site anyway); sometimes it was the new site. After about a week, it looked like all the pages had been re-indexed.
After you’ve moved domain
After migrating to a new domain and notifying Google of the change of address, I took some further actions.
Check for broken links on your site
I recommend installing a plugin like Broken Link Checker. Use this to check whether any internal or external links on your site are broken.
Update incoming links
Even though all incoming links will be redirected to your new site, I think it’s worth contacting external sites that link to you and asking them to update their links and references to your site name.
Monitor 404s
Use Search Console to monitor any 404s. This is a good indicator of any broken incoming links. When you find one, either contact the owner of the site sending the broken link or install a redirection plugin.
Keep the old domain
Don’t be tempted to let the old domain name lapse. You need it to ensure that all your old links still get redirected to your new site. So when the time comes, you’ll need to keep renewing the domain indefinitely.
Update your Google Analytics account
You can also update your Analytics account by changing the property name and address. This way you can continue to track search traffic on the same account, allowing you to easily see any differences since the migration.
Moving your site from one domain to another
This process is pretty involved and takes a lot of advance planning. The migration process itself should be fairly painless but, I think, it’s important to keep monitoring your site after the migration to ensure you’re not losing out on any traffic.
There’s a more in-depth article on moving domain on Kinsta’s blog which is worth checking out if you’re looking to go into more detail on some of the specifics.
Otherwise, if you’ve found this article useful, please take a look at some of the WordPress plugins I offer on this site.