What is an NS record in DNS?
NS stands for nameserver. The record answers one question: which servers hold the real data for this zone? Resolvers rely on it to find your DNS host at all, so a wrong one doesn't break a single name. It takes the whole domain offline.
| Quick facts | |
|---|---|
| RR type number | 2 |
| Defined in | RFC 1035; delegation rules in RFC 1034 §4.2 |
| Holds | The hostname of an authoritative nameserver |
| Where it appears | Parent zone (delegation), your zone apex, delegation points for subdomains |
| How many | At least two per zone (RFC 1034) |
| Apex NS in Bridge DNS | Created and maintained by Bridge, not editable |
| Subdomain NS in Bridge DNS | You can add them, Auto TTL 120 seconds |
How resolvers use nameserver records
A recursive resolver that knows nothing about your domain starts at the root. The root servers reply with the nameservers for the TLD, such as .com. The TLD servers reply with the nameservers for example.com. That reply is a referral, not an answer, and it's the delegation your registrar published. Only then does the resolver ask one of your nameservers for the actual record.
Resolvers cache every step. Once they reach your zone, they usually trust the NS set your own nameservers return over the copy from the parent, because RFC 2181 ranks authoritative data higher. That's one more reason the two sets should match.
NS record syntax
example.com. IN NS ns1.bb-ns.com.
example.com. IN NS ns1.bb-ns.net.
example.com. IN NS ns1.bb-ns.org.
dev.example.com. 120 IN NS ns1.example.net.
dev.example.com. 120 IN NS ns2.example.net.
Each line has an owner name, an optional TTL, the class, the type and a nameserver hostname. The first three lines are the apex set for a zone hosted on Bridge DNS. The last two hand dev.example.com to another provider.
The target is always a hostname. An NS record can't point at an IP address, and the hostname must not be a CNAME alias (RFC 2181 §10.3).
Registrar nameservers vs NS records in your zone
People use "nameservers" for two different things, and mixing them up causes most delegation problems.
| Nameservers at the registrar | NS records in your zone | |
|---|---|---|
| Where they live | The parent zone, such as .com |
Your own zone on the DNS host |
| Who edits them | You, through the registrar | Your DNS host (apex) or you (subdomains) |
| What they do | Send resolvers to your DNS host | Confirm which servers are authoritative |
| Cached for | Often 172,800 seconds (48 hours) in .com and .net |
The TTL set in your zone |
| On Bridge | Set to the three Bridge nameservers | Apex set managed by Bridge |
The registrar side is the one that matters first. Resolvers learn about your nameservers from the parent zone. While resolvers still use the old delegation, they query the old provider. See how to change nameservers at your registrar.
The two sets should match. When the parent lists one set and the zone lists another, resolvers may switch between them, and debugging gets confusing fast.
How Bridge manages the apex NS set
When you add a domain, Bridge DNS creates the apex NS set for you: ns1.bb-ns.com, ns1.bb-ns.net and ns1.bb-ns.org. We keep it in sync with the SOA record and serve it from every nameserver. You can't edit or delete it.
That's deliberate. Deleting or mistyping the apex NS records is one of the oldest ways to break a zone. The nameservers spread across three top-level domains, so a problem at one registry doesn't take all of them out.
Your part is to copy those three names into the registrar's nameserver settings. No glue record is needed: the Bridge nameservers live in their own domains, not inside yours. For how these servers answer queries, see how an authoritative DNS server works.
How to delegate a subdomain with NS records
Sometimes one part of a domain belongs to someone else. A team runs dev.example.com on its own DNS, or a vendor hosts mail.example.com with its own servers. NS records let you delegate a subdomain without giving up the rest of the zone.
- Get the nameserver hostnames from whoever will run the subdomain.
- In the Bridge zone, choose Add record and pick NS.
- Enter the subdomain label, such as
dev. - Enter the first nameserver hostname. Add a second record for the next one. Two or more is the norm.
- Remove any other records you had for
devand names under it. From now on, the other servers answer for them. - Save, then test the delegation with
dig.
If the delegated nameservers sit inside the subdomain itself, say ns1.dev.example.com, the parent needs a glue record with their IP addresses. Otherwise resolvers can't find them. Pick nameservers outside the subdomain whenever you can. A signed subdomain needs a DS record in the parent zone to complete its chain of trust.
A step-by-step guide to delegating subdomains is planned. [ссылка на P052 — после одобрения бэклога]
How to check NS records
See what resolvers get:
dig example.com NS +short
ns1.bb-ns.com.
ns1.bb-ns.net.
ns1.bb-ns.org.
To see what the parent zone says, follow the path from the root:
dig example.com NS +trace
The last referral before your nameservers answer is the registrar's delegation. For a subdomain, dig dev.example.com NS +short should return the servers you delegated to. Querying one of them directly with dig @ns1.example.net dev.example.com SOA confirms it actually serves the zone.
Common NS mistakes
- Lame delegation. The delegation points to a server that doesn't serve the zone. Resolvers get REFUSED or no answer, then SERVFAIL.
- Registrar and zone disagree. One set at the parent, a different set in the zone. Fix the registrar side first.
- Changing nameservers before importing records. Resolvers move to an empty zone. Always import first.
- Leaving an old DS record. A signed domain moved to a new provider without removing the DS record fails validation everywhere.
- Leftover records under a delegated subdomain. Once
devis delegated, records you keep fordevin the parent zone are ignored. - Pointing NS at a CNAME or an IP address. Use a plain hostname that has its own A or AAAA record.
How long does an NS change take?
Changes in your Bridge zone are live within seconds. The registrar side is slower. Resolvers that cached the old nameservers can keep using them until the parent delegation's TTL expires.
That's why we tell people to keep the old provider's zone running and unchanged for two days after a move. Some recursive resolvers will still ask it.
NS record questions
What is an NS record?
An NS record lists an authoritative nameserver for a zone. The parent zone uses NS records to delegate a domain to its DNS host, and the zone itself repeats them at the apex. Resolvers follow them to find where the real answers live.
What is the difference between nameservers and NS records?
"Nameservers" usually means the delegation you set at your registrar. NS records are the DNS entries that carry that delegation in the parent zone and in your own zone. They should list the same servers.
Can I edit NS records in Bridge DNS?
Not at the apex. Bridge creates and maintains the apex NS set so it can't be broken by accident. You can add NS records to delegate a subdomain to other nameservers.
How many NS records should a domain have?
At least two, as RFC 1034 requires, ideally on separate networks. Zones on Bridge DNS get three nameservers in three different TLDs.
Can an NS record point to an IP address?
No. An NS record always holds a hostname. If that hostname is inside the zone it serves, the parent also needs a glue record with its IP address.
How do I find the NS records for a domain?
Run dig example.com NS +short, or nslookup -type=ns example.com on Windows. To see the registrar's delegation as well, use dig example.com NS +trace.
See also the DNS record types.