What is a DNS NS record?
There are several types of records - or Resource Records as they are called - in the Domain Name System (DNS). This page explains what the NS record is and how it's used.
The purpose of a DNS NS record #
The NS record allows you to delegate further DNS records to different nameservers.
The NS record stands for "nameserver".
Complex NS record structures are often used for very large domain names or organisations, where some (sub)domains can be delegated to different nameservers that are managed by different teams or technology stacks.
The structure of a DNS NS record #
ohdear.app. 3600 IN NS ns4.combell.net. ohdear.app. 3600 IN NS ns3.combell.net.
This example indicates that DNS records for our domain should be found on either
ns3.combell.net. This is always "round robin", each nameserver has a similar weight or preference and can be chosen randomly.
Unlike MX records, where you can provide a priority or preference for those records, the NS records are always to be treated equal.
Special use cases of DNS NS records #
The NS records allow you to delegate portions of your domain to other nameservers.
For instance, take the following example:
sub.domain.ohdear.app. 3600 IN NS ns1.otherprovider.tld. sub.domain.ohdear.app. 3600 IN NS ns2.otherprovider.tld.
If a client wants to know where
example.sub.domain.ohdear.app can be found, it'll have to walk up the DNS tree to find that all DNS queries for
*.sub.domain.ohdear.app should be queried from one of the two NS records defined higher.