A site migration is a lot like surgery: nobody ever wants to do it, but it’s sometimes inevitable. Yet – also a lot like surgery – if you do it wrong, you can find yourself in the middle of some major problems.
We’ve run quite a few site migrations. On the easy end of the spectrum you have a simple site refresh. On the difficult end of the spectrum, especially from an SEO perspective, you have an entire domain migration. That’s what we’ll take on in this post.
Domain migrations, where your entire site is moving to a new domain, are never ideal. However, we’ve had to manage a few of these, and there are some best practices to follow to ensure that your organic search rankings don’t drop. The cause for migrating a domain is usually a rebrand, when a company decides to create an entirely new public-facing brand, or an acquisition, where a company has bought another website and wants to bring it into the motherfold.
Over time, we’ve assembled a step-by-step checklist for overseeing a migration, so I’ll share this with you along with detailed explanations for why every step is taken.
1) First, make sure that the lines of communication are open between you and the technical team in charge of the site redesign.
Be able to talk to the developers directly if you need to, not just the marketing department. Sometimes things happen fast, and if the marketing team went home for the weekend, it can be days before you can talk to a developer.
2) Crawl both the old site and the new site with an external crawl tool.
Use a tool like Screaming Frog. Save the site structure to reference later, in case something changes.
3) Add a robots.txt file on the new site to prevent indexing from search engine spiders.
Adding a robots.txt file prevents indexing. Simply create a .txt file named “robots” and place in your site root directory. Add the following code inside the file:
User-agent: * Disallow: /
4) Verify that both sites (the old and the new) are registered in Google Search Console.
5) Ensure Analytics is running appropriately on both sites.
You want to be able to track all activity. Especially if something goes wrong: tracking the metrics is important. You need all the data possible in order to make decisions in the event of an abnormality.
At some point, the technical team should clone the old site to the new domain. During this point they will likely update branding and wording. Perhaps you’ll need to change all the brand names from Old to New, but try to keep the rest of the content, wording, and messaging as similar as possible.
6) Keep site trailing URLs identical
When migrating site, keep URLs exactly the same. For example, oldsite.com/about should be mirrored at newsite.com/about. Although branding can be changed, keep headings and page content as similar as possible in the majority of pages.
7) Verify that the new site is live and ready to be indexed.
It’s worth it to manually check through the new site and make sure there aren’t any glaring errors. Sometimes automated crawling tools can’t catch everything. Be sure to clear cache or browse in incognito mode.
8) Add a 301 regex redirect to the new site
In order to set up a 301 redirect, you’ll need to use the following code inside an .htaccess file in the root of the old website. Open a text editor (not WordPad or Word) and create a text file. Paste the following code and save as .htaccess (not as a .txt file). This is a system file and might not be visible unless you enable hidden files to be shown on your system.
Redirect 301 / https://www.newsite.com/
What this does is tell the server to redirect “/” (the old site) to the new site (the second URL). In case you want to set up page specific redirect, you can add lines to the file. If your about page changed URLs, this is how you would do it:
Redirect 301 /about-us.html https://www.newsite.com/about.html
9) Remove the robots.txt file from the new site.
You now want search engines to be able to index the site. Delete the robots.txt from the new domain.
10) Use GSC’s “change of address” function
Use Google Search Console’s change of address function to indicate to Google the domain has changed.
11) Keep the old site up as long as possible.
Just make sure the regex .htaccess file in place, so that URLs forward. Leaving the site up shouldn’t hurt your brand or your SEO, since it’s supposed to be forwarding to the new site anyway.
12) Update all social media properties of the old site to link to the new domain. This provides a social signal of the brand continuation.
There might be a few contingencies that happen, even though you didn’t want them to.
One contingency is removed pages. In many site rebrands or migrations, some pages will inevitably have to be deleted or changed. If some pages must be removed for branding purposes, don’t redirect these pages. They should default to a hard 404 so that Google removes these quickly. Cut your losses!
Another possible issue are pages that did not get deleted, but simply changed trailing URLs. Changing your URL structure (for example, renaming about.html to about-us.html) can negatively affect SEO and is not recommended. In case this does happen, set up individual 301 records for these pages.
With every site migration, you can expect to have some sort of effect on your organic traffic. In the case of a migration from HTTP to HTTPS, you can expect an improvement, but all other migrations will most likely have a negative effect of some amount.
A domain change is one of the most difficult SEO migrations to complete while retaining positions, due to a complete change of URLs. So your goal is to reduce the time and severity of a drop in Google rankings.