What a glue record is
A glue record is an address record (A or AAAA) for a nameserver, stored in the parent zone (the zone above your domain, such as com for example.com) as part of the delegation. A resolver following a referral (the parent's answer pointing to the child's nameservers) uses it to find nameservers whose names sit inside the delegated domain. Without glue, the resolver would need the delegated zone to find the delegated zone.
Glue is not a separate record type. It is any record in a zone file that is not properly part of that zone. Address records are the only type of glue defined. The delegation itself consists of NS records in the parent zone, and the child zone has no explicit reference to its parent. The value of an NS record must not be a CNAME and must have address records.
Address records in a response's additional section can come from glue, cache or authoritative data. This entry calls them glue only when they surely come from glue records.
When a domain needs glue: the in-domain rule
An in-domain (also called in-bailiwick) nameserver has a name inside the delegated domain, including the domain's own name. A sibling nameserver has a name within the parent domain but outside the delegated domain.
The rule: if a nameserver is in-domain, such as ns1.example.com for example.com, you need glue. In-domain glue is not optional data in a response. Glue for sibling nameservers is often not strictly required, because resolvers can make follow-on queries. Most implementations include it anyway as an optimization. Cyclic dependencies among sibling nameservers can only be broken by glue in the referral. Glue is needed only in the delegating zone, not in the child zone.
Here is the delegation of example.com as the parent zone holds it:
; In the parent zone (com.)
example.com. IN NS ns1.example.com.
example.com. IN NS ns2.example.com.
ns1.example.com. IN A 192.0.2.53 ; glue (IPv4)
ns2.example.com. IN AAAA 2001:db8::53 ; glue (IPv6)
To see the delegation, run:
dig +trace example.com NS
dig NS example.com
In the parent's referral, the authority section lists the NS names. The additional section carries address records for in-domain names.
For custom nameservers on your own domain, Cloudflare's documentation says you provide the names and Cloudflare assigns one IPv4 and one IPv6 address to each custom nameserver. Those addresses are what the glue must carry.
Fixing missing or wrong glue after a nameserver change
Absent glue may leave an authoritative server unable to return a useful referral. Responses that lack required glue and have TC=0 have been observed in practice and cause resolution failures. Extraneous glue is a known source of error and confusion, so remove glue the delegation no longer uses.
Before you change anything, note the current nameserver names and glue addresses. A wrong change can take your website and mail offline. Registrars differ in where they offer glue settings, but the glue is held in the parent zone with the delegation.
Check these points, which come from delegation checks:
- Glue addresses must match the host's authoritative
AandAAAArecords. - The
NSset your nameservers serve must match the set in the parent. - Every authoritative server must serve the same
NSset and the same SOA. - List at least two
NSrecords whose hosts do not share one IP address. - Servers must answer over UDP and TCP on port 53.
- Servers must answer authoritatively, with the AA bit set.
- An
NSname must not be aCNAMEand must have address records.
To compare the parent with the nameservers themselves, look up the nameservers a domain delegates to, check the A and AAAA records of your nameserver host, and run a domain health check.
References
- RFC 9471: DNS Glue Requirements in Referral Responses, IETF, section 7
- RFC 2181: Clarifications to the DNS Specification, IETF, sections 5.4.1, 6, 10.3
- draft-koch-dns-glue-clarifications-05, IETF
- Technical requirements for authoritative name servers, iana.org
- Nameservers ยท Cloudflare DNS docs, developers.cloudflare.com