Changing your domain: be carefull

Written by Simon Kloostra on 10 February 2014

There may be times when the URL for your website needs to change to a new one. This may be because you found a better URL for your website, or, as a webdesigner, your client simply requests you to do so. A while ago I ran into such an issue for one of my own clients. A psychologist had 5 domains, all optimized for one of the 5 locations where she was working from. For all these cities the site was nicely optimized, but maintaining the sites and agenda's became a drag.

So, the solution was to start up a new domain. Normally, choosing one of the existing 5 would have been better then starting a new one, but all of these had the city in the URL, which would have made it less optimal for attracting visitors for the other 5. So the challenge would be to start a new site, move traffic over to the new site, and hope that Google would place the new site in the rankings instead of the old sites. This is always a risky situation. If not done well, all organic ranking might be lost, and even if you do use the correct procedures, Google might still not do so.

Anyhow, the picture is clear now I guess, how do we achive this?

Create the new site

First I created and optimized the new site. As initially it will have no relationship with the other sites, my hands were free to fully optimize it and publish it. Now the site was ready, fully optimized, but of course without any authority or ranking.

Determine the existing URLs

The whole idea of the operation is to route any traffic currently going to the existing 5 sites to the new one. Most importantly, these must all be set-up as 301-redirects. A 301-redirect will tell search engines to use the rerouted link, and carry the weight and authority of the existing site to the new one. To achieve this, all the URLs of all 5 sites were retrieved. There are various ways to achive this:

Create a sitemap, or use the existing sitemap

Check Google to see which URLs are indexed. You can do so by simply searching for site:website.com

Other....

Actually I combined these 2 methods, as they did not deliver exact matches. Then I simply put them in a spreadsheet document.

Determine new URLs and match the old ones

Then, determine the new URL structure. Just use the sitemap you probably already generated. Also copy these URLs as a separate column in the spreadsheet.

Match up old and new URLs

Now make sure to match up the old URLs with the CORRESPONDING new ones. The easy way to simply route everything to the home page of the new site, but this is not the way to go. Make sure to link the old contact page to the new one, and do so for all individual URLs. In this case I had to do this for all 5 sites. Your sheet could now look something like this:

Old URL

New URL

contact.html

contact

treatments.html

treatments

treatments/addiction.html

addiction

pricacy-statement.html

privacy

Etc.

Etc.

Prepare 301 Redirects

At this stage, start creating 301-redirects. There are multiple ways to do so. You can manually enter them in the Redirect Manager in Joomla, create 301-redirects in your .htaccess file or use an extension. As long as the result is a 301-redirect, you should be fine. I use SH404SEF on my new site, which allows me to configure aliases, so I just entered the old URLs as aliases for the corresponding new URLs.

Untill this point, the old sites are still working. I created the 301-redirects as a fishing net on the new site, so they will only be used once the old links are hit on the new site.

Switch over the old sites

Time to switch over. I did this by placing a .htaccess file in the root of the site. I could have chosen to prepare a .htaccess file on each site and route all links one by one to the new one, but doing so I might risk omitting URLs, which will then bounce as a 404-error on the old site. So instead I simply created a rule to route ALL traffic to the new one, and to keep the requested relative URL. So, if someone requested old-site.com/link-a.html, he would simply be routed to new-site.come/link-a.html. This is still not the correct situation, but my "fishing net" on the new site will take care of that, and make sure that link-a.html is routed to the corect URL.

The code that I used in my .htaccess file (on the old site) to route all traffic to the new one was:

Inform Google Webmaster Tools

Many do not know this step, but it is possible to let Google know that you are changing the domain of your site! You will do so with your Google webmaster account. This could be extremely valuable of course. Unfortumately for my migration I could not touch the old sites before Imoved the domain over to my new webhost. If you can however, make sure to have the old sites configured in your Webmaster account so that you can use this procedure. Also, make sure the new site is configured.

To start the procedure, go into the record for the site you are working on and click Settings >> Change of Address:

You will be presented a list of sites currently in your account. Just choose the new site and the he following screen will appear, offering a checklist before actually transferring your site:

After this procedure, your new site should start replacing your old site in the SERPs pretty soon.

Note: Though relatively low in marketshare, do not forget to do the same in your Bing / Yahoo Webmaster account (Under Diagnostics and Tools you will find the Site move feauture).

Wait and see....

Now it's time to wait a few days. Google usually takes a few days to reflect the new situation. In the mean time, you should keep monitoring for possible 404-errors from the old sites, using either the Redirect Manager, or an extension (SH404SEF again in my situation). If all goes well, the sites keep ranking well. This also depends on the competition for the keywords you are aiming for.

If competition is rather low, your site might simply take the place of the old one. In the situation for the psychologist, this pretty much was the case. For sites that have more fierce compition, you could expect to be set back more or less, but as long as your site is optimized well, chances are also high that after a drop, it might rise again.