Preparing DNS For Migration

Follow

Preparing DNS is one of the first steps when looking to migrate domains from one system to another. Having DNS prepared can save a lot of headaches, so it's worth investing time in it before moving data. Here are some of the basics in getting DNS ready.

Lower TTL (Time To Live) On Records

A fundamental of DNS is that records are cached. Cacheing means lower resource usage for servers, lower network traffic for queries and faster pageloads (because they don't need to resolve DNS again). The caching is present on just about any device that can resolve DNS. This includes computers, routers, proxies and even web browsersScreen_Shot_2017-12-11_at_3.41.08_pm.pngEven Google Chrome has an in-build DNS cache.

However when migrating, it's recommended to lower the TTL of records so they expire from the cache sooner, forcing connections to have to lookup the DNS information again.

Depending on what DNS system you're using, it may be as simple as adjusting the time value in the domain management area. On cPanel servers, you can use "Home »DNS Functions »Set Zone Time To Live (TTL)"
Screen_Shot_2017-12-11_at_3.54.47_pm.png
DNS records will expire after 600 seconds (10 minutes).

Note

- Do NOT put the TTL lower than 300 seconds. Other nameservers can refuse to cache a value so low and revert to their default, which can be upwards of 14400 (4 hours).
- If the domain isn't using your nameservers, changing the TTL on your server won't make a difference.

 

Unify Domains Under Common Nameservers 

For migrating a single domain, it's not a problem to update the nameservers to a new set once the data has been moved. However when moving multiple domains, it quickly becomes very time consuming to update all the nameservers.

A better way of handling the updates is to unify all the domains under a common set of nameservers before moving them.

Consider the following scenario. You have hosting with Someprovider™. They setup the nameservers:
ns1.abcxyz.someprovider.com = 192.168.0.1
ns2.abcxyz.someprovider.com = 192.168.0.2

When domains are migrated from their system, you'll need to update the nameservers to your servers new ones, because
a) You don't control the nameserver records, so can't update where they go to
b) They'll likely terminate them once you cancel with them.

To make the migration easier, you can create nameservers that resolve to the same location of your current nameservers, and then update domains to start using them instead. 

See this guide on creating custom nameservers:
Creating Nameserver Host Records

Instead of creating the Host record to the new server (and the A record in your domain's zone file), you would create them to resolve to the old server:
ns1.yourdomain.com = 192.168.0.1
ns2.yourdomain.com = 192.168.0.2

Now you can start updating domains to use the nameservers you set up. 

The advantage of doing it this way is so that
a) You can identify sites using external DNS servers and therefore don't have control over.
b) When all accounts are migrated, you only need to update the IP of ns1/ns2.yourdomain.com at the registrar to the new server IP and all the domains will follow it.
c) Once migrated, nothing ties domains to the previous hosting.

Have more questions? Submit a request

Comments

Powered by Zendesk