Sub topic 8
Registering a Domain and Delegating It to Name Servers
This chapter assumes you know the DNS hierarchy (root, TLD, authoritative servers), what a zone is, and the core record types, and that you can run dig from a terminal. Here you will see who is involved when you register a domain and how the registration connects to the name servers that answer for it.
Who is involved in a registration
Three parties take part, and people often confuse them.
- The registry runs a top-level domain (TLD). Verisign runs
.com, for example. It keeps the authoritative database of every name under that TLD and operates the TLD name servers. - The registrar is the company you buy from. It is accredited by the registry and submits your registration to it.
- The registrant is you, the holder of the domain. Your contact data is stored with the registrar and, depending on the TLD and privacy rules, in WHOIS or RDAP.
You rent a domain, usually for 1 to 10 years. You do not own it permanently. If you do not renew, the name eventually returns to the pool.
What delegation means
Registering a name does not make it work. It only reserves it. For the domain to resolve, the registry's TLD zone must contain NS records that say which name servers are authoritative for your domain. This is called delegation: the parent zone (com.) hands responsibility for example.com. to the servers you name.
When a resolver looks up www.example.com, the TLD servers answer with a referral. The referral lists your NS names, and the resolver then asks those servers. You set the NS names at your registrar, and the registrar passes them to the registry.
You can see the delegation as the parent zone publishes it:
dig +trace example.com NSIn the trace, the step from the com. servers lists the NS records that the registry holds. The final step shows the NS records inside your own zone. Both sets should match.
Glue records
A problem appears when the name servers are inside the domain they serve. If example.com uses ns1.example.com, a resolver needs the address of ns1.example.com to ask it, but it cannot find that address without first asking example.com's servers. To break the loop, the registry stores glue records: A or AAAA records for the name server hosts, served in the referral from the parent zone.
You set glue at the registrar, often under a heading like "host records" or "child name servers". Glue is only needed when the name server's name is under the domain it serves. Using ns1.dnsprovider.net for example.com needs no glue.
Registrar DNS versus separate DNS hosting
The registrar and the DNS provider can be different companies. That separation is a common design choice.
| Setup | Where NS records point | Where you edit records |
|---|---|---|
| Registrar's default DNS | Registrar's name servers | Registrar's control panel |
| Third-party DNS provider | Provider's name servers | Provider's control panel |
| Self-hosted | Your own servers (glue needed) | Your zone files |
Moving DNS to another provider takes these steps:
- Create the zone at the new provider and copy every record. Compare against the old zone so that MX, TXT, and subdomain records are not lost.
- Lower the TTL on the existing NS and key records ahead of time, if you can.
- Change the NS names at the registrar.
- Wait for the old NS TTL to expire, then confirm with
dig. - Remove the old zone only after the new one is answering.
Common errors
- Changing NS before the zone exists. The new servers answer
REFUSEDor with no data, and the site goes down. Create and test the zone first. - Mismatched NS sets. The registry's NS list and the NS records inside the zone differ. Some resolvers will use one set and some the other. Keep them identical.
- Editing records in the wrong place. If NS points to the provider, records edited at the registrar do nothing.
- Letting the domain expire. Renewal lapses silently if the payment card fails. Turn on auto-renew and keep the contact email valid.
- Unverified contact email. Registrars must verify the registrant's email, and may suspend the domain if you ignore the verification message.
You can check what the registry holds and what each server returns:
dig +short NS example.com
dig @ns1.example.com example.com SOA +norecurseExercise
You move example.com from your registrar's DNS to a new DNS provider. You copy all records, then change the NS names at the registrar. Which two checks confirm the change worked, and where does each get its answer?
Show answer
Run dig +trace example.com NS to see the NS records the .com registry publishes, and query a new provider server directly, for example dig @ns1.newprovider.net example.com SOA +norecurse, to confirm it is authoritative and holds the zone. The first reads the parent zone's delegation. The second reads the authoritative server's own data.