DEV Community

Websitesnmore
Websitesnmore

Posted on

Step by Step Guide: Moving Domains With Minimal Damage to SEO

If you are a web developer or an SEO, you might have faced a situation where the client wanted to move domains for some reason.

While moving or switching domains is a pretty simple, things might get a little more complicated when you are moving domains for a website that has had a considerable amount of work done from an SEO point of view.

We were put in a similar situation in early 2020, a client ran into legal issues in the US as their name was already registered by another business. The same name caused no trouble in their home country but as soon as the entered the US market, they got a legal notice from another business that shared the same name as them.

Being in the SEO game for about 5 years and working with a number of businesses both big and small, we thought we had seen it all but clearly not!

As they say, there is always something new to learn each day at work.

Given that this was a completely new situation we got ourselves into, Google was our first stop to try and find the best way to do this.

After going through a number of articles, we felt that while they were informative, none of them gave a complete picture. Something that was a step by step guide that you could use as a handbook to go through this process.

Anyways, now that we have gone through this process already, it is a good time to share our thoughts on how you can safely move a domain name with minimal damage to SEO and what can you expect after the change.

What you will need before getting started

  • Access to the domain registrar for both the new and old domain provider.
  • Access to CPanel for the hosting provider.
  • Access to Google Search Console.
  • Access to the Content Management System.

Before you get started

Before you get started, ensure that you have download the sitemap of the existing website using a sitemap generator tool.

This will ensure that you have a copy of all the links from your existing website and can preserve the link structure on the new domain as well.

Remember that the search engines have crawled certain target pages and ranked them, so, it is important that you preserve the link structure of the website.

Another step you must take prior to starting the domain transfer is to take a complete backup of your site, just in case things don’t go according to plan.

The steps involved in switching domains

Step 1: Point the new domain to the existing server where your website is currently being hosted.

This can be easily done from your domain registrar’s dashboard. For obtaining the DNS records of your hosting provider, you can look up the settings of your existing domain or contact your hosting provider.

Step 2: Add the new domain to your hosting

For this, you will need access to your CPanel, navigate to Addon Domains in your CPanel and follow the steps.

Step 3: Copy the files from your old domain folder to the new folder

This step will involve copying the files from your old domain’s folder to your new domain and can be easily achieved utilising CPanel.

Step 4: Change the domain name for your website

This way you achieve this will vary based on the CMS you are using. We worked on WordPress and in order to make this change, we had to undertake the following steps. It is best that a web developer is involved in this process.
On the WordPress dashboard, go to settings and then the general screen, here you can change the domain of your website and click save.
Then you will need to make changes to the wp-config file. Basically, you will need to define the site URL and homepage URL in this file.
Ensure that the change has taken place.

Step 5: Change the primary domain in CPanel

Now you are all set to change the new domain as the primary domain on your CPanel. Once done, add the old domain as an add-on domain.

Step 6: Setup SSL for both the domains

Using the CPanel, you will need to set up a new SSL certificate for both the domains. Some hosting providers provide a free SSL certificate while others charge a yearly fee.

This step is necessary for websites that were using an SSL certificate on their old domain as well.

Step 7: Setup a 301 Redirect utilising Wildcard method

This is the easiest way to redirect all your links will be to use the wildcard redirect. This will be done for the home directory and the sub-directories available within this folder.

In our case, we were dealing with a Woocommerce setup, therefore, we placed 3 wildcards as below,

www.websiteurl.com
www.websiteurl.com/products
www.websiteurl.com/product-category

This took care of all the links on the website. Once the redirect has been put in place you can check if the 301 redirects are in place by using an external tool.

Step 8: Setup the new domain on Google Search Console and start the transfer process.

Now, you will need to set up the new domain on Google search console, make sure you use the same account on Google that was used for the old domain to add this new domain.

Go to the address change tool, which can be found under the settings menu on your search console.

Here, you can add the new URL in question and undertake the verification using one of the methods.

Once verified, simply follow the steps on the search console to make this change.

Step 9: Add a new sitemap under the newly created search property on the search console.

Finally, you will need to submit a sitemap for the new domain so that the search engine can crawl and index the site.

And that’s it you are done.

What to expect after the transfer is complete?

You will need to be patient while the search engines do their trick. Don’t expect the changeover to happen in a few days or even weeks.

For our client, the change took place over a period of 3-4 months and also lead to a fluctuation in rankings.

Another thing you will notice after the transfer has taken place is that you will continue to see the old site pages appear on the SERP results.

This will eventually get corrected and all you need to do is continue with your SEO efforts as you would normally.

Top comments (0)