How To Move Your Website To A New Domain

Moving a website to a new domain can defiantly be a daunting task, especially if it has been up for a number of years, and has build up backlinks from all over the World Wide Web. You may want to move your website to a new domain for any number of reasons, from a company re-brand, to simply you got yourself a better domain name then you previously had. The main issue you should be concentrating on though is your current SEO, and keeping your current standings with the new domain name.

Our project this week was to move a high profile client to a new .london domain name, from their .com. Their new domain name is a lot shorter, and also more specific to the company, in terms of the actual name, and the .london extension seeing as though they mainly work around the London area. Over the years I have moved a number of websites from domain to domain, but this time I thought I would outline the process involved in a transfer.

First Things First

This guide will assume that you are just transferring your website to a new domain, and in no way will the actual website be changing its structure. This is the easiest way to update your websites domain name, as its structure will be exactly the same. Things can get even more complicated if the new domain is hosting a completely different structure, but this is not impossible to keep your SEO standings in good order.

301 Redirect Website To New Domain

Google has even stated that moving domain name and changing your website structure all in one go is a serious issue, and should be done in stages. I.E. Move your current website to a new domain name, and then update your website once the new domain name has populated around Google.

Preparation

With any task, preparation and the correct tools are the key to success, the more preparation you do at the start, the quicker the whole task takes, and a website could be transferred in well under an hour. There are two main options here:

  • Have a fully working backup of your current website, and transfer this to a new host with your domain name pointing to this host. Remember if you chose this option, to make sure you have a robots.txt or meta tags in place to stop search engines crawling this site before you have 301 redirected your current website.
  • Have your new domain hosted at the same hosting service, pointing to the same hosting folder. Most hosts now allow for multiple domains to be pointed to the same website. Depending on the website type, chances are you will just need to run a couple of queries to update the references from the old domain to the new domain. This is usually the easiest way.

Both options are suitable, but you have to make sure you can still hold both domains, with this being said, the second options are by far the safest and cheapest method. If you go for the first method, you will need to remember that you will need to host a small .htaccess file on the old server, that will redirect users from the old domain to the new domain. Using the second option, you save the cost of running two hosting packages.

Next, we will need to make sure the following:

  • Both domains are set up, verified and accessible via your Google Search Console (formally Google Webmaster Tools).
  • If you are using Google Analytics, make sure you have full permissions to update the domain name.
  • A full backup of your website and database.

301 Redirects

In order to preserve all your current rankings and backlinks, we need to create what is known as 301 redirects, which tells Search Engines that this website has moved address. Much like you would set up with the Post Office if you moved home, where your mail would be forwarded to your new address. So when someone visits any page, from the home page to a sub-page on your old website, they will be redirected to the same page on the new website.

Htaccess 301 Redirect
Visual Guide To 301 Redirects

As we have previously stated, it is advised not to change the website structure in any way when doing a website domain move, as we are assuming a like for like structure when creating these 301 redirects. Using the diagram above, you can see how a user/bot will land on the old domain, go through the htaccess file, and be redirected to the same page on the new website.

Using the htaccess code below, which is small but very powerful, as it will redirect every single page of your website from its old domain to the new domain, no matter how many pages your website has, this will redirect them all.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.newdomain\.com
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

If for whatever reason you need to change the structure of your website on the new domain name, then things get a lot bigger, as you will need to redirect every single page from your old URL to your new URL using the code below. The bigger the website, the more work that is required to create a redirect for.

redirect 301 /old-url1.html http://www.newdomain.co.uk/new-url1.html
redirect 301 /old-url2.html http://www.newdomain.co.uk/old-url2.html

It is esential to have your htaccess file with the redirects ready before you switch the domain over; otherwise, your website will be inaccessible from the user or bot coming to any search engines to your websites old domain.

Change To Your New Domain Name

Now all the redirects are in place, you should now be in a position to change the domain names over. If you went for the first point in the preparation section of this tutorial, where you are running two separate hosts, all you need to do to complete this stage is to deploy your htaccess file on your old host domain name. This will redirect users from any URL within your old domain to your new domain. This will also work to redirect sub-pages to the very same subpages on your new domain. You should also make sure you have no robots.txt file set which will stop search engines crawling the htaccess file / old website.

If you chose the second point, where you have the single hosting package with both domains linked, you will need to update your current htaccess to point anyone that visits from the old domain to be redirected to the new URL. This will go at the top of the htaccess file before your current websites statements.

Inform Google

At this stage, you should have your website live on your new domain name, with your old domain name 301 redirecting to users to the new domain. This process is usually good enough for your website to automatically be updated in Googles cache, but Google does offer several functions within its Search Console to inform them of a domain change, which makes the process a lot smoother in Googles eyes, and doesn’t cause any confusion with Google.

To start this process, you need to perform a “Change of Address” within Google’s Search Console, by proceeding to your old domain name, clicking the little cog icon, and selecting “Change of Address”.

Google Change Of Address Checklist
Submitting change of address in Google Search Console

You should have already confirmed your new domain name is confirmed back in the preparation stage of this tutorial, so you should be able to find the new domain under the drop-down menu in step 1 of Google’s Change of Address checklist. Once selected, press the submit button to proceed to step 2, which will confirm that you have set up the 301 redirects correctly. Step 3 will then confirm that you have verified the new domain name within the Search Console, something which you should have already confirmed in the preparation stage.

Submit Your Sitemap(s)

Now within Search Console, jump to your new domain name, and proceed to submit your sitemap to Google, confirming all your links on the sitemap are updated with the new URL. This is done by selecting Crawl > Sitemaps.

Google Submit Sitemap

The process would be to first test the sitemap to check for errors before proceeding to submit the sitemap.

Fetch As Google

The final step in getting Google to crawl the new website domain is to fetch the page from Google’s eyes. This is done from within the Search Console by selecting Crawl > Fetch as Google.

Fetch As Google

Start by fetching your home page, and submitting this to Google’s crawl index, once submitted, proceed to submit your key landing pages. This should help speed up Google crawling the new domain.

Testing

You should now have a fully functional and redirected website on the new domain name, with the old domain name transferring users to the brand new domain name. Google will also be updating its database with your new domain. It is usually best to practise to make sure all your old domain links are redirecting correctly. This can be done by typing the following search into google: site:yourolddoain.com

This will bring back a list of links that Google had indexed to your old domain name. Click these links and make sure you are redirected to your new domain.

If you use Google Analytics, remember to update the domain name on this, else you will not see any search traffic coming through. Unless of course, you want to create a brand new profile for your new domain.

That is basically it… If you have any questions or queries, just post them in the comments below, and we would be on hand to give you a hand. If you are not confident at doing this process yourself, get in touch with us and we can take control of the whole process for you.

Leave a Reply

Your email address will not be published. Required fields are marked *