Switching Hosting Providers the Painless Way
When switching email/web hosting from one provider to another, the process causes an outage window while the domain is delegated between the providers, and, more importantly, mail can be routed to the old provider while you are downloading from the new provider. However, this can be avoided by careful manipulation of the DNS records. The process is:
- Make an audit of your email mailboxes (and passwords) and web content so you are sure what needs to be replicated on the new provider. Be aware of any other DNS records required (such as www2.<domain>.com.au or ftp.<domain>.com.au).
- When the new service is provisioned, make sure you notify the ISP not to delegate the domain. The domain's name servers must remain as they are (for the moment).
- Create all the required mailboxes and upload all the web content to the new hosting provider. Add any required DNS records to the new provider's servers (eg. www2.<domain>.com.au etc. as above).
- Create a matching alias for the POP3 host. Some ISPes use pop.<domain>.com.au, some use mail.<domain>.com.au etc. Create a CNAME entry in the new hosting provider's DNS to match the old hosting provider's default alias if the new provider's default alias does not match.
- Check that the website operates properly by using the new hosting provider's staging address.
- Alter the old hosting provider's DNS records to point the alias www to the new hosting provider's address, and check that the website works. Depending on the provider, it may take some time (a few minutes to 30 minutes) for the domain record to be updated. You may need to ping the address to check if it has switched over. Also, your local DNS resolver may cache the old address for a while.
- Ensure all your email clients are regularly downloading their mailboxes.
- On the old hosting provider's DNS, set the mail exchange record (MX) to point to the new hosting provider. At this point, any incoming email will flow to the new provider, and will not be accessible to clients. This is because the clients are still downloading their mailboxes from the old provider via pop.<domain>.com.au (or whatever it is called) which is still hosted by the old provider. Let the clients continue to download their email for a while to catch any straggler email coming in from various places.
- Switch the POP3 host to the new provider by altering the old provider's DNS to point pop.<domain>.com.au to the IP address of the new provider's POP3 host (or this could be a CNAME entry). Although this is instantaneous (apart from the hosting provider's internal update schedule), this may take a while to take effect on clients as the local DNS resolver caches the old values.
- Check that email is arriving and being downloaded properly.
At this point, the old provider is merely providing DNS services because the www alias, the POP3 host, and the mail exchange records all point to servers on the new provider. The old provider is still the name server for the domain.
- When email and web services are verified to be working correctly, redelegate the domain to the new provider. Because both the old and new provider's DNS are pointing to services at the new provider, it does not matter how long the delegation takes and can be done during working hours without an outage.
- Delete the mailboxes on the old hosting provider. This is so that any mail arriving there (due to an old or cached MX record) will be bounced back to the sender. They can then wait a while and re-send.
- The old hosting plan may now be discontinued.
Tip: At each stage you can check the worldwide propagation of DNS changes using http://www.whatsmydns.net/.