dig / nslookup Flags & Options
DNS lookup tools.All dig / nslookup pages
- dig +noall +answer: show only the answer records with their TTLdig +noall +answer prints only the answer records with name, TTL, class, type and data, unlike +short. Add +comments to see NXDOMAIN or SERVFAIL status too.
- dig +short: print only the answer (IP address or record data)dig +short prints only the answer data, such as IP addresses or MX hosts, one per line for scripts. Empty output also hides NXDOMAIN, so check the status.
- dig +tcp: query DNS over TCP instead of UDP (truncated answers, firewalls)dig +tcp sends the DNS query over TCP port 53 instead of UDP. Test firewalls, truncated answers (TC flag) and large DNSSEC responses; related transport options.
- dig +trace: follow DNS delegation from the root serversdig +trace follows the delegation from the root servers down to the authoritative ones, step by step. Use it to find broken NS records and skip resolver caches.