An NS record is a DNS record that lists an authoritative name server for a domain. A domain name can have multiple NS records. For example, the dnscheck.co domain has two NS records pointing to the guy.ns.cloudflare.com and chan.ns.cloudflare.com name servers.
NS records are also called "name server records". Name servers are also called "DNS servers".
NS records are defined in RFC 1035.
DNS Check can monitor your NS records, and notify you if they become unresolvable, or start pointing to the wrong name servers.
Delegation
Publishing a domain's NS records is what delegates the domain to its name servers, and it happens in two places. The parent zone (the .co zone, in the case of dnscheck.co) holds the delegation that resolvers follow when they look the domain up, and the domain's own zone file holds an authoritative copy of the same records. The two sets should match.
Delegation works for subdomains too. Adding NS records for eu.dnscheck.co to the dnscheck.co zone file hands that subdomain off to a different set of name servers.
When a name server is inside the domain that it serves, such as ns1.dnscheck.co serving dnscheck.co, the parent zone also needs glue records. These are A or AAAA records that provide the name server's IP address, so that resolvers don't have to query the domain in order to find the name servers for that same domain.
Fields
Here are the fields that make up an NS record:
| Field | Description | Example |
|---|---|---|
| Name | A fully qualified domain name (FQDN). | dnscheck.co. |
| Type | The DNS record type. Always set to "NS". | NS |
| Value | The fully qualified domain name (FQDN) of an authoritative name server for the domain specified in the Name field. | guy.ns.cloudflare.com. |
DNS Zone File Examples
Here's an example of how NS records look in a DNS zone file:
; Name Type Value
dnscheck.co. NS guy.ns.cloudflare.com.
dnscheck.co. NS chan.ns.cloudflare.com.
The Name ends in a period in the above example, so it's a fully qualified domain name.
Alternatively, you can create an NS record that's relative to the zone file's $ORIGIN. Here's an example of how to do this to create DNS records that are equivalent to what's shown in the previous example:
$ORIGIN dnscheck.co.
; Name Type Value
@ NS guy.ns.cloudflare.com.
@ NS chan.ns.cloudflare.com.
Additional Resources
- RFC 1035 - this RFC defines NS records.
Protect your DNS infrastructure with automated monitoring
Get notified immediately when DNS records change. Start monitoring your critical DNS infrastructure for free in under 5 minutes.
No credit card required • Cancel anytime