isitdns? wiki/Tools/nslookup and dig
Tools

nslookup and dig

nslookup ships on Windows. dig ships with the [BIND 9 utilities][isc-dig].

Asks for the default type, which is A, in dig's full layout.

 dig @1.1.1.1 isitdns.net
; <<>> DiG 9.20.11-0ubuntu0.2-Ubuntu <<>> @1.1.1.1 isitdns.net
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44191
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;isitdns.net. IN A
;; ANSWER SECTION:
isitdns.net. 300 IN A 104.21.56.211
isitdns.net. 300 IN A 172.67.155.242
;; Query time: 35 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Mon Sep 14 17:52:09 CDT 2026
;; MSG SIZE rcvd: 72

GO NOERROR and the A records, with the header and flags nslookup hides

NO GO SERVFAIL

run this query in the dig tool →

what each part of this output means →

Task by task#

Taskdignslookup
Quick A lookupdig @1.1.1.1 isitdns.netnslookup isitdns.net 1.1.1.1
A and AAAA togethertwo lookups (A, then AAAA)default behavior
One record typedig @1.1.1.1 isitdns.net MXnslookup -type=MX isitdns.net 1.1.1.1
Reverse (PTR) lookupdig -x 1.1.1.2nslookup 1.1.1.2
Answer only, no headerdig @1.1.1.1 +short isitdns.netnot available
No recursion (RD=0)dig @158.101.0.110 probe.isitdns.net SOA +norecnslookup -norecurse -type=SOA probe.isitdns.net 158.101.0.110
Skip dnssec validationdig @1.1.1.1 +cd isitdns.netnot available
Request DNSSEC signaturesdig @1.1.1.1 isitdns.net +dnssecnot available
Walk the hierarchy from rootdig +trace isitdns.netnot available
Force the literal name, no search suffixdefault behaviornslookup webmail. (trailing dot)
Apply the search suffixdig webmail +searchdefault behavior
See header flags (aa ad ra rd)default outputnslookup -debug NAME, or set debug in interactive mode

Where they differ#

  • Search suffix. nslookup appends the resolver's configured search domain to a bare name before querying; dig never does unless you pass +search. A trailing dot forces the literal name in both. Source: [BIND 9 nslookup manpage][isc-nslookup] (search/nosearch, srchlist).
  • A and AAAA together. With no -type given, nslookup queries A and then AAAA and prints both; dig with no type asks only A. Source: [BIND 9 nslookup manpage][isc-nslookup]: "The defaults are A and then AAAA... only the default behavior looks up both."
  • No flags line. dig's default output prints the full header (qr aa rd ra ad, RCODE, section counts). nslookup shows none of that unless debug is on: -debug on the command line or set debug in interactive mode; it is off by default. Source: [BIND 9 nslookup manpage][isc-nslookup] (nodebug keyword, default nodebug; "Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen").
  • DNSSEC / AD visibility. dig sets the AD (authentic data) bit on its own queries by default, so a validating resolver's ad flag shows up on a plain lookup (RFC 6840 §5.8); +dnssec also requests the RRSIGs. nslookup has no DNSSEC option: it cannot set DO or display AD. Source: [BIND 9 nslookup manpage][isc-nslookup] (no DNSSEC keyword in the option list).
$ nslookup isitdns.net 1.1.1.1
Server:         1.1.1.1
Address:        1.1.1.1#53

Non-authoritative answer:
Name:   isitdns.net
Address: 104.21.56.211
Name:   isitdns.net
Address: 172.67.155.242
Name:   isitdns.net
Address: 2606:4700:3032::6815:38d3
Name:   isitdns.net
Address: 2606:4700:3036::ac43:9bf2

Non-authoritative answer: labels any response with the Authoritative Answer bit clear, which is every answer relayed by a recursive resolver, cache hit or not (RFC 1035 §4.1.1, the AA bit). nslookup shows the label; it does not show the bit itself. dig's flags line shows aa directly.

[isc-nslookup]: https://bind9.readthedocs.io/en/latest/manpages.html#std-iscman-nslookup [ms-nslookup]: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup [isc-dig]: https://bind9.readthedocs.io/en/latest/manpages.html#dig-dns-lookup-utility

See also#

  • dig-tool: the in-browser dig on the isitdns front page, which emits dig, kdig, and nslookup equivalents for every query
  • dig-along: every common record type, live, hands-on
  • dig-flags: the dig flags this wiki uses
  • anatomy-of-a-query: what happens between the time you hit Enter and the answer arrives
  • query-types: record types and rcodes explained
  • dnssec-troubleshooting: where delv comes in
  • dot-doh: DoT, DoH, and DoQ for encrypted DNS queries
  • ptr: reverse DNS and the in-addr.arpa zone
  • [Microsoft Learn: nslookup reference][ms-nslookup]
  • [ISC BIND 9: nslookup manpage][isc-nslookup]
  • [ISC BIND 9: dig manpage][isc-dig]