Spring Fresh Sale! - Up To 67% OFF BDIX Hosting + Free Domain
DNS

Glue Records Explained: How Custom Nameservers Actually Resolve

A glue record is an IP address for a nameserver, published at the parent (registry) level, that breaks the chicken-and-egg problem you get when a domain's nameservers live inside the domain itself. Without glue, custom nameservers like ns1.example.com simply cannot resolve.

The chicken-and-egg problem

Suppose example.com uses ns1.example.com and ns2.example.com as its nameservers. To look up anything in example.com, a resolver must contact ns1.example.com — but to find that server's IP, it must look up example.com, which requires contacting ns1.example.com. It is a loop with no exit.

How glue breaks the loop

Glue records solve it by having the parent zone — the .com registry — publish the IP addresses of those nameservers directly, alongside the delegation. So when a resolver is referred to ns1.example.com, the referral includes its IP address as a glue record. The resolver never needs to resolve the nameserver's name separately, and the loop is broken.

When you need glue

You need glue whenever a nameserver's name is within the domain it serves — the classic case being custom (vanity) nameservers like ns1.yourdomain.com. If your domain instead uses a provider's nameservers on a different domain, no glue is needed on your side, because those names resolve independently.

How glue gets created

Glue is registered at your registrar using a "register a nameserver" or "host records" function — you tell the registry the nameserver name and its IP. This is separate from the A record you also create in your own zone. Both should agree. See registering private nameservers.

Verifying glue

A dig +trace shows the delegation and whether the nameserver IPs are being handed out as glue in the referral from the parent.

Frequently asked questions

Do I always need glue records?

Only when your nameservers are named within the domain they serve (like ns1.yourdomain.com for yourdomain.com). If you use a provider's nameservers on a separate domain, those resolve on their own and need no glue from you.

Where do I create glue records?

At your registrar, via a "register nameserver" or "host records" option, where you associate the nameserver hostname with its IP. This registers the glue at the registry, separate from the A record in your own zone.

My custom nameservers don't resolve — is it glue?

Very likely. If ns1.yourdomain.com has no glue at the registry, resolvers cannot break the loop to find it. Register the glue with the correct IP and ensure your zone's matching A record agrees.

Was this article helpful?