Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Glue records missing: the nameserver hostname will not resolve

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

When a domain's nameserver hostname will not resolve, resolvers can be stuck before they ever ask that server for the rest of the zone. RFC 1034 says parent zones "have all the information needed to access servers for their children zones." NS records name the servers "but do not give their addresses." If the nameserver's name is inside the child zone, "the NS RRs tell us that in order to learn a name server's address, we should contact the server using the address we wish to learn." Glue is the address record added to break that circle.

Glue is not required for every nameserver. RFC 1034 says these records "are only necessary if the name server's name is "below" the cut, and are only used as part of a referral response." A nameserver such as ns1.example.net for the zone example.com has its address in example.net, not as glue in example.com.

What the symptom means

RFC 1034 describes a zone's data in four parts. One part is "Data that allows access to name servers for subzones (sometimes called "glue" data)." The glue records "are not part of the authoritative data, and are address RRs for the servers." RFC 9499 quotes that passage and the circular case that glue exists to avoid.

The delegation NS records at the parent "are NOT part of the authoritative data of the zone, and should be exactly the same as the corresponding RRs in the top node of the subzone." The child zone also has its own NS set, and that set is authoritative. Glue is the address that rides with the parent's referral when the nameserver name is below the cut. The address should also exist in the zone that is authoritative for that nameserver name, which is the child zone when the name is inside it.

A missing address is not the same as a server that is down. Here the resolver cannot learn an address to contact. A query for the nameserver name itself fails or depends on a hint the referral did not include.

Likely causes

Cause What you see How to confirm
The NS name is inside the delegated zone and the parent referral has no address The NS lookup returns a name, and the address lookup of that name fails or cannot start dig the NS set, then dig the NS name for A and AAAA
The address was added only in the child, and the parent has no glue The child answers when you already know its address, and a cold lookup does not Ask a parent server for the NS set with dig +norecurse, and read its Additional section for an address for the NS name
The NS name is outside the zone and its address is missing in that other zone Glue at the parent is not what RFC 1034 requires The NS name's own zone, queried for A
The parent NS set and the child NS set differ Referrals and authoritative answers name different servers Compare the NS answer from the parent with the NS answer from the child

Prove the cause before changing anything

All of these are read-only. The manual's form is dig @server name type. The manual's example dig +noall +answer example.com shows "just the name, record type, TTL, and value for each answer". +trace "follows referrals from the root servers, showing the answer from each server". +norecurse toggles the RD (recursion desired) bit, and +additional displays the additional section of a reply, which is the default. The default type is A.

1. List the nameservers.

dig +noall +answer example.com NS

Write down each name. These are hostnames, not addresses.

2. Look up an address for each nameserver name.

dig +noall +answer ns1.example.com A
dig +noall +answer ns1.example.com AAAA

If the name is inside example.com, this query is the circular one. An empty result, or a lookup that never reaches a server, fits the missing-glue case, but a failed lookup does not by itself prove that glue is missing. Step 3 does. If the name is in another zone and this query returns an address, glue is not required for it.

3. Read the parent's referral. Run dig +trace example.com NS and note the name of the root or TLD server that gave the referral (the one before the zone's own servers appear). That server belongs to the parent zone. Then ask that server directly, without recursion, with its name in place of a.gtld-servers.net:

dig +norecurse @a.gtld-servers.net example.com NS

Read the Additional section of the reply, which dig shows by default. RFC 1034 says glue is used as part of a referral response, so for each in-zone nameserver name the Additional section should carry an address. A referral that names ns1.example.com in the NS records and gives no address for it in the Additional section is the gap.

4. Compare parent and child. Ask the parent servers shown in the trace for the NS set, and ask the child, by address if you have one, for its NS set. RFC 1034 says those NS sets should match.

Fix

For a nameserver name below the cut, RFC 1034 puts the glue address in the parent's referral, and the child zone also holds the address as authoritative data for that name. The parent's glue is entered through the registrar's or registry's own interface. RFC 1034 and the dig manual do not describe that interface; your registrar's help pages cover it. The glue is what repairs a referral with no address, so there are two changes, made in this order: the child zone, then the parent's glue at the registrar. The child zone's address record on its own does not repair a referral that has no address.

Step 1: the address in the child zone

First, save the NS listing and the current address answers for each nameserver name, and export or copy the child zone's current record list from your DNS host into a file named child-zone-before.txt:

dig +noall +answer example.com NS > ns-before.txt
dig +noall +answer ns1.example.com A > ns1-a-before.txt

Repeat the second command for each nameserver name and for AAAA, with a separate file name for each.

Risk: the next step adds an address record for the nameserver name in the child zone. A wrong address sends resolvers to the wrong host for the nameserver name, and so for every name in the zone that depends on it. Changing the NS name at the same time, without an address, recreates the circle.

In the child zone, add the A or AAAA record for the nameserver name. Use the address of the server that actually answers for the zone. Before you publish it, check that the server at that address answers for the zone with dig @203.0.113.10 example.com NS, using your own address.

To undo it: if child-zone-before.txt shows a record for that name before the change, set it back to that value. Remove the record you added only if child-zone-before.txt shows none.

Step 2: the glue at the parent

First, save the parent's current referral, and copy what the registrar's nameserver or host-record screen shows now for each nameserver name and address into a file named registrar-glue-before.txt:

dig +norecurse @a.gtld-servers.net example.com NS > parent-referral-before.txt

Risk: the next step changes the address the parent publishes for the nameserver name. A wrong address sends every lookup of the zone to the wrong host until the parent publishes the right one, and a resolver may keep the old referral until its TTL ends.

At the registrar, enter or change the address for each in-zone nameserver name, using the same address as in the child zone.

To undo it: put the values saved in registrar-glue-before.txt back. If the screen showed no address for that name before, remove the one you entered.

Example (illustrative): example.com is delegated to ns1.example.com and ns2.example.com. The Additional section of dig +norecurse @a.gtld-servers.net example.com NS shows those names in the NS records and no addresses. dig +noall +answer ns1.example.com A does not return an address. The administrator saves the NS list and the zone's record list, adds A records 203.0.113.10 and 203.0.113.11 for the two names in the child zone, saves what the registrar screen shows, and enters the same two addresses there. The same query to the parent server then shows the two addresses in its Additional section. Undoing the child zone change means removing those two new address records.

Confirm the fix

  1. dig +norecurse @a.gtld-servers.net example.com NS, with your parent server in place of that name, shows an address in its Additional section for each nameserver whose name is inside the zone.
  2. dig @ that address returns the NS set for the zone.
  3. dig +noall +answer on the nameserver name returns the same address, once a resolver can complete the lookup.
  4. A nameserver in another zone still resolves from that zone, with no glue added for it.

What to watch afterwards

  • Adding a new in-zone nameserver name needs its address in the same edit as the NS record.
  • An address change has to be made in the glue (through the registrar) and in the child zone. Updating only one of them leaves referrals and authoritative answers in disagreement.
  • A signed zone's delegation also has a DS record. A glue fix is not that change.

Risks and limits

  • RFC 9499 notes a wider informal use of the word glue. The test here uses the RFC 1034 rule: address records for nameservers below the cut, used in a referral.
  • The dig manual does not label a section "glue". You are looking for an address record for the nameserver name in the Additional section of the parent's reply.
  • Parent and child NS sets can differ in practice. RFC 1034 says they should be the same.

Sources