Glossary / NS record
NS record (name server record)
An NS (name server) record names the DNS servers responsible for a domain's zone, the servers that hold all of the domain's records. The rest of the internet asks these servers for the domain's A, MX and TXT records, so whoever runs them controls your site's DNS.
Check your site
When you register a domain, the registrar sets NS records such as ns1.tomishost.com and ns2.tomishost.com. This is delegation: the top-level registry lists these servers as responsible for the domain, and from then on every query about it goes to them.
Changing the NS records hands control of the DNS to another provider: a host, Cloudflare or a dedicated DNS service. After the change, all of the domain's records come from the new pair of servers, and the old ones stop counting.
There are always at least two NS records, for reliability. If they point to the wrong servers or clash with what is set at the registrar, the domain's DNS behaves erratically: part of the world sees the old records and part sees the new ones.
Example
example.com. 86400 IN NS ns1.tomishost.com.
Common mistakes
- Confusing the NS at the registrar with the NS inside the zone; the registrar's records are the ones that delegate the domain.
- Changing NS and expecting an instant effect; because of a high TTL, delegation can take a day or two to update.
- Leaving an old server among the NS records, so some queries time out on it or get stale answers from it.
- Assuming the old records carry over when you switch NS; the zone on the new DNS has to be filled in from scratch.