How to migrate your site from one domain to another

Migrating a site from one domain to another can be a daunting task. But if we create a clear plan then it is a manageable task. Here some of the things you should keep in mind when you plan a domain migration for your site:

  1. Make sure you own both domain in Google webmaster tools. Also read Google guideline for migrating your site.
  2. Its a good idea to first create a new site and once it is stable, migrate to it. You may have to maintain 2 sites for a short duration. If you can maintain both with single code base, that is ideal.
  3. Change any Google Analytics information on the new site as domain has changed.
  4. Since it is a brand change, make sure you replace all instance of the brand on the new site with new brand name.
  5. If you have sub domains, you may have to migrate them also.
  6. If you have any site SSL setup, you may have to request for new SSL certificate as it is tied to the domain.
  7. If you have any facebook apps, you may have to change those callback urls in app settings.
  8. If you are migrating a blog also, then make sure all image and other links in posts points to new domain.
  9. Once everything is done, setup HTTP 301 in Apache conf file or whatever webserver you are using. Here is how it will look for Apache:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^(www\.yoursite\.com|yoursite\.com)$ [NC]
    RewriteRule ^/(.*)$$1 [L,R=301]
  10. It is a good idea to keep a rollback option in case new site does not work well.
  11. In Google webmaster tools, inform Google that you are migrating to new domain. This can be done in “Site configuration” -> “Change of Address”. This can only be done if you are migrating a top level domain to another top level domain. Here is how it looks in Google webmaster tools:

Post migration steps

  1. Watch out for any 404 on old or new site.
  2. Watch for traffic on your old site. You should see mostly HTTP 301 entries in Apache log (if you are using Apache web server). Slowly the traffic on your old site should reduce.
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit


Click here to write/view comments