Moving DNS From the Registrar to a Separate Host Without an Outage
Illustrative example. The shop, its records and the providers are hypothetical. The sequence, however, follows how the DNS works and is the usual way to avoid a gap in service.
An online craft shop has always used the free DNS hosting that came with its registration at Registrar A. It now wants a separate DNS provider, Host B, for features such as an API and better change history. The domain stays registered at Registrar A; only the authoritative DNS moves. The shop's zone includes the website records, mail exchanger (MX) records for its email provider, a few TXT records for email authentication and site verification, and a CNAME for a help-desk tool.
The order of work
- Export or copy every record. The owner lists each record at Registrar A: name, type, value, priority for MX, and TTL. Records that are easy to forget include TXT entries for SPF and DKIM, CAA records, and records on subdomains such as
mailorshop. - Recreate the zone at Host B first. Host B gives the shop its own nameserver names. The owner enters all records there and then queries Host B's nameservers directly (for example with
dig @nameserver example.com MX) to confirm the answers match the old ones before anything is switched. - Lower TTLs in advance. A day or two before the change, the owner lowers TTLs on the important records at Registrar A, so that resolvers which cached the old answers expire them sooner. The TTL on the delegation itself, the NS records published by the parent zone, is controlled by the registry rather than by the shop, so some resolvers may keep using the old nameservers for a while whatever the shop does.
- Change the nameservers at the registrar. In Registrar A's control panel, the owner replaces the registrar's nameservers with Host B's. The registrar passes this to the registry, and the parent zone starts pointing to Host B.
- Keep the old zone running. The owner leaves the records at Registrar A in place for several days. Resolvers still using the old delegation keep getting correct answers, so there is no gap.
The DNSSEC branch
If the domain was signed with DNSSEC at Registrar A, the move needs extra care, because the parent zone holds a DS record that refers to Registrar A's signing key. Switching nameservers to an unsigned zone, or to a zone signed with a different key, while the old DS record is still published can make validating resolvers treat the domain as broken. The cautious route is to remove the DS record at the registrar, wait until the old DS record's TTL has passed, switch nameservers, then enable signing at Host B and publish the new DS record. Some providers support a smoother key handover, but the simple "unsign, move, re-sign" path is easier to reason about for a small zone.
Checking the result
After the switch, the owner checks the website from a mobile network as well as the office connection, sends test emails in both directions, and confirms the help-desk subdomain still resolves. Checks are repeated the next day, once more resolvers have picked up the new delegation. Only after a quiet week does the owner delete the zone at Registrar A, and even then keeps the exported record list in the shop's files.
What made this move uneventful was not a special tool. It was doing the steps in an order that never left any resolver without a correct answer.
Sources
- IETF, RFC 1034 and RFC 1035 (Domain Name System concepts and specification)
- IETF, RFC 4033 to RFC 4035 (DNS Security Extensions)
- ICANN, DNSSEC information for registrants