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:
- Make sure you own both domain in Google webmaster tools. Also read Google guideline for migrating your site.
- 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.
- Change any Google Analytics information on the new site as domain has changed.
- Since it is a brand change, make sure you replace all instance of the brand on the new site with new brand name.
- If you have sub domains, you may have to migrate them also.
- If you have any site SSL setup, you may have to request for new SSL certificate as it is tied to the domain.
- If you have any facebook apps, you may have to change those callback urls in app settings.
- If you are migrating a blog also, then make sure all image and other links in posts points to new domain.
- 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 ^/(.*)$ http://yournewsite.com/$1 [L,R=301]
- It is a good idea to keep a rollback option in case new site does not work well.
- 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
- Watch out for any 404 on old or new site.
- 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.