Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

When I do this dig I get no answer...

red@localhost:~$ dig +noall +answer

... but when add soa I get an answer for ...

red@localhost:~$ dig +noall +answer soa   868     IN      A         2926    IN      SOA 2013120202 28800 7200 604800 600

... what is going on here?


share|improve this question
If you removed the +noall part, dig would probably tell you – Mathias R. Jessen Dec 3 '13 at 23:08
remove the +noall tells me NXDOMAIN without the soa query (as one would expect). But with the soa in the dig command it gives me the answer. I just wondering why dig behaves this way. – Red Cricket Dec 3 '13 at 23:46

1 Answer 1

up vote 1 down vote accepted

Directly from dig -h:

Usage:  dig [@global-server] [domain] [q-type] [q-class] {q-opt}
            {global-d-opt} host [@local-server] {local-d-opt}
            [ host [@local-server] {local-d-opt} [...]]


        global d-opts and servers (before host name) affect all queries.
        local d-opts and servers (after host name) affect only that lookup.

When you write:

dig +noall +answer 

dig treats it as:

+noall +answer
- global options, applies to all queries
- host to lookup, at a specific name server

But when you write:

dig +noall +answer soa

dig treats it as:

+noall +answer
- global options, applies to all
- host to lookup soa
- another lookup for a SOA RR, but this time, at a specific server

So the A RR response you receive for the first host is not from

share|improve this answer
that's does appear to be the case. Since dig returns NXDOMAIN yet dig soa returns an answer for both the 'A' RR and the 'SOA' RR. – Red Cricket Dec 4 '13 at 16:41
@RedCricket My bad, take a look at the update – Mathias R. Jessen Dec 4 '13 at 18:17
awesome! Thanks for clearing that up for me. – Red Cricket Dec 5 '13 at 6:00

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.