17

Say I've operating ns1.example.org and ns2.example.org on which I want to host the zone file for example.com

When I go to my registrar and purchase example.com , I will tell my registrar that my nameservers are ns1.example.org and ns2.example.org

My question then is, why do I then also need to specify those nameservers in the zone file for example.com ? Haven't I already told the .com nameservers where to lookup information on example.com , making the NS records redundant?

Clearly I'm missing some crucial fact...

Joel Coel
  • 12,910
  • 13
  • 61
  • 99
  • For a more detailed discussion, check out: https://serverfault.com/questions/526278/clarification-of-why-dns-zone-files-require-ns-records#526322 – Kal Nov 30 '19 at 11:07

1 Answers1

15

NS Records inside the zone are authoritative, the ones received from the registrar (the ones delegating the domain) are not, so if a server receives any difference from those records, the authoritatives win. Also, servers listed in the NS record will receive a NOTIFY in case of zone changes (so the slaves can check for updates and so on). One last thing, the RFCs 1034 and 1035 say that they must exist, so they must exist!

coredump
  • 12,573
  • 2
  • 34
  • 53
  • 1
    I wanted to post an answer exactly like that. But it came first. – Gopoi Apr 04 '11 at 01:46
  • 1
    Are there legitimate use cases for having the NS records not match the registrar's delegation? – Nathan O'Sullivan Apr 04 '11 at 01:49
  • @nathan Well you can have many NS records on your file, but some registrars will limit the number of name servers you can add on their interfaces. Now about having completely different records on the registrar and the zone file no I can't think on any right now. – coredump Apr 04 '11 at 02:12
  • Thanks - whats the big deal about "authoritatives winning"?Is it do with how recursive resolvers cache responses?i.e. does a recursive resolver cache a more authoritative answer? Would someone explain the caching behavior of NS records from an Authoritative and Non Authoritative response. Say, a resolver receives delegation and caches delegation NS record from a parent; Next the resolver receives A record as answer from child - Does it also get / request NS record at the child authoritative Name server as part of response? – Abhishek Palakkal Kaliyath Jun 03 '20 at 09:39