How to Protect Your SEO Rankings When Migrating to a New Domain

How To Protect Your SEO Rankings When Moving Domains

We put so much effort into building our websites and enhancing our SEO rankings that changing domain name and migrating a WordPress website can be quite daunting. Thankfully, Google has made provisions for domain name switches, and in this blog we will show you the steps to take in order to hang on to your Google ranking while making the transition.

Why move?

It should be pointed out that sticking with an existing domain name is definitely preferable, so if you don’t have to make the switch, you really shouldn’t. But there are reasons, such as a change of brand name for instance, that moving to new domain names and migrating content becomes necessary.

Other factors may include the discovery of a domain name that you believe is better, or that your old domain name was penalised for some reason. So how do we go about moving domain name in the first place? Let’s start at the beginning.

Before we begin

We should note that most of the advice you will read is aimed at long term SEO stability, and that your site might, and is likely to, see a dip of sorts while the process takes place. These tips are also provided in the assumption that you have a back up for your WordPress site, and if you’ve not done so already, here is how you can do it.

It is also important to point out that you are required to retain ownership of your previous domain name, even if you will not be using it any more; this is essential to redirection.

Migrating to a new domain? Here’s how not to lose your Google ranking

Step 1: Copying all current site content to the new domain

Don’t redirect anything until you have copied your site to your new domain. This can be done using the Duplicator plugin, which allows you to transfer all your URLs to the new domain, this means it will include all the internal links across your pages.

Step 2: Redirection of old to new site

You need to perform a 301 redirect which will allow both search engine robots and human users to find the correct page on your new site. This requires finding your .htaccess file, which you can do with an FTP program such as Filezilla which gives you access to the server of your WordPress site. You can find the .htaccess file in your site’s root folder.

After you’ve downloaded it, make a copy of it, and this will act as your back up. Then open the .htaccess file with a text editors such as Notepad. The code should appear as something similar to “htaccess”.

First, you need to redirect at domain level by adding the following code to the top of the .htaccess file,

RewriteEngine on
RewriteCond %{HTTP_HOST} ^ [NC,OR]
RewriteCond %{HTTP_HOST} ^ [NC]
RewriteRule ^(.*)$$1 [L,R=301,NC]

You then need to add your individual pages and posts by adding the 301 redirect code line by line, and the 301 redirect code if you are planning on retaining an identical URL structure should be:

Redirect 301 /original-post

For those that are structurally changing their URL structure, there is the need to redirect every link manually, which can take a lot of time.

After saving the new .htaccess file, traffic should be redirected to the URLs on your new site from your old domain. Undergo a period of manual testing to check they are working properly using the Fetch as Google tool in the Google Search Console to make sure Google is being properly redirected to your new site.

Use Fetch As Google In Search Console

Step 3: Notify Google that your domain name has changed

Google needs to be told about your changes, and you can make sure the transition is smooth by filling out their official form. This can be done by navigating to the Google Search Console which used to be called Webmaster Tools. Verify your old domain name if you haven’t already, and then use the same process to confirm your new site – both of them must be registered correctly within the Google Search Console.

You click on the gear icon in the old domain name’s dashboard and find the Change of Address form which needs to be filled out.

Using Change Of Address In Google Search Console

After you have followed the instructions and completed the form, click submit.

Search Console Change of Address Instructions

Step 4: New sitemap submission

You can submit a sitemap for your new domain to Google, and this is done by creating your new site’s XML sitemap, before submitting to the Search Console. We recommend using the Yoast SEO plugin for all your website sitemap.xml requirements.

Submit A New Sitemap Using Search Console

Step 5: Monitoring of the Google Search Console

If Google encounters indexing problems, you can see them in the Google Search Console, so make sure you are constantly monitoring it in the wake of the changes. Among the important reports are search queries and index count, and for a full list of what to check, take a look at this Google support document.

Step 6: Inbound link updating

It is a useful exercise to contact any sites that have linked to you and request that they change the URL used to the new domain – maybe getting all of them changed is unrealistic, but even achieving some is a plus. And don’t forget about updating the URL on all your social media profiles and pages.

Step 7: User notification

As a matter of course, you should let your readers know that you have switched domain, in order to avoid any uncertainty about your current address, and encourage them to use the right URL. You might do this by including a page on your new site which explains the changes, or alternatively creating a custom 404 error page to tell people they have clicked on a link which has been improperly directed – you can, in fact, do both.

Step 8: Wait for the rankings jump

If you have taken all the above steps you have fulfilled your side of the bargain when it comes to minimising the effect of a domain change in terms of SEO. You just need to patiently wait for Google to index your new site fully, before you hopefully witness a rankings jump. Don’t forget, an initial rankings slump if perfectly normal and should not represent a worry.