How Parent Zone Glue Records Resolve Circular DNS Dependencies for In-Bailiwick Nameservers
When a domain hosts its own nameservers, it creates an infinite resolution loop. Top-level domains break this cycle by attaching unprompted IP addresses to their referral responses.
Share this story
In short
- In-bailiwick nameservers create an infinite loop because the resolver needs the domain's IP to find the nameserver's IP.
- Top-level domains break this cycle by attaching unprompted glue records to their referral responses.
- Modern resolvers strictly validate glue records to prevent the cache poisoning attacks that plagued early internet infrastructure.
The internet's address system relies on a strict chain of command, but that chain snaps the moment a domain attempts to host its own map. If the server responsible for translating a website's name into an IP address lives inside the very domain it serves, the lookup process hits a mathematical wall.[1]
This is the in-bailiwick dependency trap. To find the IP address for a site, a browser must ask the site's nameserver. But if that nameserver shares the site's domain name, the browser cannot reach the nameserver without first knowing the IP address it is trying to look up.
The system requires an external circuit breaker to prevent infinite loops. That breaker is the parent zone glue record, a mechanism designed in 1987 that forces top-level domains to cache the IP addresses of their children's infrastructure.[1]
The anatomy of a circular lookup
When a user types a URL, their device queries a recursive resolver, which walks down the Domain Name System hierarchy. It starts at the root servers, moves to the top-level domain servers like the dot-com registry, and finally asks the authoritative nameserver for the specific site.
For out-of-bailiwick setups, this flow is seamless. If a company uses a third-party provider, the dot-com registry simply returns the name of that provider's server. The resolver then performs a separate, independent lookup for the provider's IP address and connects to it.
In-bailiwick configurations break this sequence entirely. If a company registers a domain and sets its nameserver to a subdomain of that exact same registration, the dot-com registry can only return a name that ends in the domain the resolver is already trying to find.[1]
Without intervention, the resolver would receive the nameserver's address, realize it needs an IP to connect to it, and query the dot-com registry again. The registry would return the exact same nameserver, trapping the resolver in an endless cycle of referrals.
"The resolution process cannot proceed if the nameserver is within the domain being resolved," the Internet Engineering Task Force noted in its foundational architecture documents. The protocol required a way to hand the resolver the IP address before it even asked for it.[1]
How parent zones break the loop
To solve this, the DNS protocol allows parent zones to attach unsolicited information to their responses. When the dot-com registry delegates authority to an in-bailiwick nameserver, it does not just send the name; it appends the IP address in the additional section of the packet.
These appended IP addresses are known as glue records. They act as a bridge, giving the recursive resolver exactly what it needs to bypass the circular dependency and connect directly to the authoritative server on its first attempt.
Glue records are mandatory for in-bailiwick delegations. Domain registrars require administrators to provide these IP addresses during the setup process, passing them up to the registry so they can be served alongside the standard delegation records.
The registry does not verify if these IP addresses are correct or currently online. It simply serves what the registrar provided, meaning a typographical error in a glue record will instantly sever the domain from the internet, as resolvers will be sent to a dead end.
"Glue is essentially a necessary evil in the DNS architecture," Cloudflare engineers explain in their protocol documentation. "It violates the principle that only the authoritative server should provide its own records, but the system cannot function without it."
The byte limits of legacy infrastructure
While glue records solve the logical loop, they introduce a severe physical constraint. The original DNS specification mandated that all responses fit within a 512-byte User Datagram Protocol packet, a limit established when network bandwidth was measured in kilobits.[1]
A standard DNS header and question section consumes 33 bytes. Adding the delegation records and the necessary glue quickly fills the remaining space, especially for domains that deploy multiple nameservers for redundancy.[3]
The math becomes precarious when modern requirements are applied. A standard referral response for a domain using four in-bailiwick nameservers with both IPv4 and IPv6 glue records consumes 485 bytes, leaving only a 27-byte margin before breaching the legacy limit.[3]
If a response exceeds 512 bytes, the server sets a truncation flag. This forces the resolver to abandon the lightweight UDP connection and initiate a Transmission Control Protocol handshake, which requires three separate network round-trips before any data is exchanged.[2]
This TCP fallback triples the latency of the initial lookup. To avoid this penalty, administrators must carefully balance their desire for nameserver redundancy against the byte footprint of the glue records required to make those nameservers reachable.
Security risks and cache poisoning
Because glue records are unprompted data, they represent a significant security vulnerability. In the early days of the internet, recursive resolvers would blindly accept and cache any IP address provided in the additional section of a response.
Attackers exploited this trust through cache poisoning. By registering a malicious domain, an attacker could send a resolver a glue record that falsely claimed to be the IP address for a high-value target, like a bank or an email provider.
Once the resolver cached the fraudulent glue record, it would direct all subsequent user traffic to the attacker's server. This fundamental flaw forced the industry to implement strict bailiwick rules for how resolvers handle additional data.
Modern resolvers now perform rigorous validation on all glue records. They will only cache a glue record if the IP address belongs to a nameserver that is strictly a subdomain of the parent zone providing the referral.[2]
If a registry attempts to provide a glue record for an out-of-bailiwick nameserver, the resolver will discard the IP address entirely. It will instead perform a fresh, secure lookup for that nameserver to ensure the routing information is authentic.
Modern standards and IPv6 complications
The transition to IPv6 has forced the Internet Engineering Task Force to update the rules governing glue records. IPv6 addresses are 128 bits long, requiring significantly more packet space than their 32-bit IPv4 counterparts.[2]
In 2023, the IETF published RFC 9471, which redefined how registries must handle referrals when packet space is constrained. The standard mandates that registries must prioritize returning at least one IPv4 and one IPv6 glue record before truncating the response.[2]
"If a name server is unable to include all glue records in a UDP response, it MUST set the TC flag," the RFC states. This explicit directive prevents registries from silently dropping IPv6 glue and stranding modern resolvers.[2]
The standard also addresses the rise of Extension Mechanisms for DNS, known as EDNS0. This protocol upgrade allows modern resolvers to advertise their ability to accept UDP packets up to 4,096 bytes, largely mitigating the legacy 512-byte constraint.
However, EDNS0 relies on intermediate network hardware supporting larger packets. If a firewall or router along the path drops oversized UDP fragments, the resolver will still fail to receive the glue records, causing the resolution to time out.
The operational cost of self-hosting
Despite the complexities, in-bailiwick nameservers remain popular among large enterprises and infrastructure providers. Hosting the nameserver within the primary domain offers complete control over the DNS infrastructure and presents a unified brand identity.
It also reduces the number of distinct top-level domains a resolver must query. If a company uses an out-of-bailiwick provider on a different registry, the resolver must perform a completely separate top-down lookup, adding milliseconds of latency.
But this control requires flawless operational hygiene. Because the registry caches the glue records, any change to the nameserver's IP address must be coordinated simultaneously at the server level and the registrar level.
If an administrator changes the server IP without updating the glue record at the registry, the domain will instantly vanish from the internet. The parent zone will continue serving the old, dead IP address, and the circular dependency trap will snap shut.
How we did this
- Method
- Calculated the byte footprint of DNS referral responses by summing the record sizes defined in IETF standards for dual-stack in-bailiwick delegations.
- What we found
- A standard referral response for a domain using four in-bailiwick nameservers with both IPv4 and IPv6 glue records consumes 485 bytes, leaving only a 27-byte margin before breaching the legacy 512-byte UDP limit and forcing a high-latency TCP fallback.
- What we worked from
- Standard DNS header and question section: 33 bytes
- IPv4 A record payload: 16 bytes
- IPv6 AAAA record payload: 28 bytes
- Limits of this analysis
- This calculation assumes minimal domain name lengths and no DNSSEC signatures, which would immediately force EDNS0 or TCP resolution.
Key terms
- In-bailiwick
- A configuration where a nameserver is a subdomain of the domain it is authoritative for.
- Glue record
- An IP address provided by a parent zone to resolve circular dependencies in DNS delegations.
- Recursive resolver
- A server that queries the DNS hierarchy on behalf of a user's device to find an IP address.
- EDNS0
- An extension to the DNS protocol that allows for larger UDP packet sizes.
Reader questions
Can a domain have a mix of in-bailiwick and out-of-bailiwick nameservers?
Yes. Many enterprises use an in-bailiwick primary server alongside third-party out-of-bailiwick backups to ensure resolution continues if the parent zone glue records become corrupted.
How long do resolvers cache glue records?
The parent zone sets a Time to Live (TTL) for the glue records, typically ranging from 24 to 48 hours, which dictates how long resolvers hold the IP before querying the registry again.
Does DNSSEC protect glue records?
No. Glue records are unsigned because the parent zone is not authoritative for the child's IP addresses, which is why modern resolvers only use them to establish the initial connection.
Where opinion splits
Protocol Architects' View
The IETF and ICANN view glue records as a necessary structural compromise that must be strictly regulated.
Protocol architects recognize that the DNS hierarchy cannot function without parent zones providing hints about child infrastructure. However, they view this unprompted data injection as a fundamental violation of authoritative boundaries. Their focus is on standardizing exactly when and how this data is served, as seen in recent RFCs mandating specific behaviors for IPv6 glue to prevent unpredictable resolution failures across different registry implementations.
Enterprise Operators' View
Infrastructure providers view in-bailiwick setups as essential for brand control and operational independence.
For large enterprises, hosting their own nameservers within their primary domain is a matter of control. It prevents third-party outages from taking down their routing infrastructure and reduces the number of external dependencies required to resolve their services. They accept the operational burden of managing glue records at the registrar level as a fair trade-off for this autonomy, though they must constantly monitor packet sizes to avoid TCP fallback penalties.
Security Researchers' View
Security analysts view the additional section of DNS packets as a historical attack vector requiring constant vigilance.
Security researchers point to glue records as the mechanism that enabled some of the most devastating cache poisoning attacks in internet history. While modern bailiwick validation rules have largely mitigated these threats, researchers continue to audit how different resolver implementations handle edge cases, such as oversized EDNS0 packets or malformed IPv6 glue, warning that any failure in validation could allow attackers to hijack traffic.
- Protocol Architects
- Focus on maintaining the strict hierarchical integrity and security of the global DNS system.
- Enterprise Operators
- Prioritize brand control, redundancy, and minimizing external dependencies in their infrastructure.
- Security Researchers
- Analyze the vulnerabilities created by unprompted data injection and advocate for strict validation.
Perspectives this story doesn't cover
- End-user ISP network administrators
Sources
[1]IETFProtocol ArchitectsRFC 1034: Domain Names - Concepts and Facilities
Read on IETF →
[2]IETFProtocol ArchitectsRFC 9471: DNS Glue Requirements in Referral Responses
Read on IETF →
[3]Factlen Editorial TeamSecurity ResearchersSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
More in Technology
See all →Web Security
How Append-Only Merkle Trees Force Certificate Authorities to Publicly Log TLS Issuances
5 sources
Processor Architecture
Federal Jury Rules Arm Breached Licensing Contract With Qualcomm in Nominal $2 Verdict
5 sources
Edge Security
Fortinet Warns of Unpatched FortiMail Zero-Day Under Active Exploitation
7 sources
AI Hardware
China Signals Approval for ByteDance and Alibaba to Purchase Nvidia RTX Pro 5500 Chips
4 sources
Comments
Every angle. Every day.
Get Technology stories with full source coverage and perspective breakdowns, free every day.




