Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The brunt of the question is this -- What is the relationship between the primary nameserver specified in the SOA record and the nameservers specified in the NS records. How are these things linked?

When I query most websites, I get this:

dhamma@sansa:~$ host -t SOA has SOA record 2009072715 3600 7200 604800 7200

And I expect to see as the primary nameserver, because when I query the NS record for the domain I get this:

dhamma@sansa:~$ host -t NS name server name server name server

This always led to me thinking that the SOA records somehow auto-populated the primary NS record? Is that even remotely true?

Because here's where I'm most confused:

dhamma@sansa:~$ host -t SOA has SOA record 2009012319 86400 7200 86400 99999

But I'm told, and do, use these nameservers:

dhamma@sansa:~$ host -t NS name server name server

Why is this nameserver not listed as the primary nameserver in the SOA record?

share|improve this question
up vote 6 down vote accepted

RFC 1035 says:

MNAME The of the name server that was the original or primary source of data for this zone.

although in practise this MNAME field in the SOA is mostly unused these days.

However if you're using DNS dynamic updates then it must refer to the name of the DNS server which is to receive the dynamic update messages.

See also this (expired) Internet Draft which talks about the MNAME field in detail, and how the DNS UPDATE message is the only current use for it.

share|improve this answer
This is the reason. +1 for a short, readable answer. – womble Nov 17 '09 at 8:26
that's an excellent point...especially these days with Active Directory Integrated zones (which are evil, imho). While it doesn't matter if you rely solely on MS DNS servers or not (we don't), the SOA must point to the AD controller, which with an ADI zone, should be the closest AD box to your request. – Greeblesnort Nov 17 '09 at 17:31
Yes, AD integrated DNS is evil. :) – Alnitak Nov 18 '09 at 6:46
This answer is confusing. – briankip Dec 8 '15 at 11:53
@briankip what do you find confusing? – Alnitak Dec 8 '15 at 12:00

Nameserver records are specified in your zone file. The SOA record indicates the primary nameserver for the zone. There is no automatic relationship between the two. Here is a good read regarding SOA records. The short answer is that the SOA record is the whole record contianing the name, ttl, etc... Additionally, I'd strongly suggest picking up the O'Reilly DNS & Bind book. It's really quite useful.

Your records beyond the root servers for  	172800	IN	NS  	172800	IN	NS
;; Received 116 bytes from in 152 ms  	99999	IN	A  	99999	IN	NS  	99999	IN	NS
;; Received 100 bytes from in 12 ms

Now, what this means is that, at the root servers, adns & are listed as the authorities for Then, on those servers (adns & bdns) there is an A record for the root record pointing to

I think what you're asking is why the NS records appear to be different. The answer is that the NS records were specified, likely by your registrar, to point to their servers that are authoritative for the zone. However, this output would seem to indicate a problem, as the SOA nameserver does not appear to respond to a request for your records:

; <<>> DiG 9.2.4 <<>>
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 37849
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

; 		IN	A

;; Query time: 10 msec
;; WHEN: Mon Nov 16 23:03:04 2009
;; MSG SIZE  rcvd: 31

edit: The AUTHORITY: 0 means that the server did not answer authoritatively. It seems kinda obvious when the ANSWER: 0 section is there, but it's actually important to differentiate between an authoritative answer, and a non-authoritative one. Authority, in DNS, speaks to whether or not the server you've gotten your answer from can actually be trusted to know what it's talking about.

As to why there's a server listed in the SOA, I don't know that I've ever read the reason they put it there, but that server should be the master server for the zone, hence Start of Authority, or SOA. It's not always the case, as the SOA for all 1400+ of my domains lists a primary query server in the SOA, but the actual start of authority is on a hidden master that no one can access.

share|improve this answer
Thanks so much, that clears a lot up. So what is the purpose then, of specifying a primary nameserver in the SOA? Is there a reason why it says AUTHORITY 0 in your query? Oh, so many questions. I will pick up the O'Reilly book. – scraft3613 Nov 17 '09 at 5:15
Your edit is wrong. The AA flag is used to indicate an authoritative answer. AUTHORITY: 0 simply means that there are no answers in the "authority section" of the response. – Alnitak Nov 18 '09 at 6:48
Technically correct, but I don't think that makes my edit wrong in context. Without an aa flag, you're not getting an authoritative response. Thanks though, made me reread the documentation =) – Greeblesnort Nov 18 '09 at 14:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.