BIND Utilities 9.20.5
The DNS lookup tools from the BIND distribution: dig for detailed queries, host and nslookup for quick ones, and nsupdate for dynamic record changes.
Download TAR.XZ Project website ↗Download Mirrors
Half of all networking problems are DNS problems, and dig is how you find out which half. It ships in dnsutils on Debian and Ubuntu and bind-utils on Fedora.
The queries that matter
dig example.com # full output
dig +short example.com # just the answer
dig example.com MX # mail servers
dig example.com TXT # SPF, DMARC, verification records
dig -x 93.184.216.34 # reverse lookup
Querying a specific server
The technique that resolves most disputes:
dig @8.8.8.8 example.com # what Google's resolver sees
dig @ns1.example.com example.com # what the authority actually holds
Querying the authoritative server bypasses every cache. If the authority has the new record and your resolver does not, you are waiting on TTL expiry rather than looking at a broken record. Those are completely different problems.
Tracing from the root
dig +trace example.com
Performs the resolution yourself: root servers, then TLD servers, then the domain’s nameservers, printing each step. This is how you find which delegation is broken when a domain resolves for some people and not others.
Reading the status line
NOERRORwith an answer: fineNOERRORwith no answer: the name exists but has no record of that typeNXDOMAIN: the name does not existSERVFAIL: the resolver failed, often DNSSEC or an unreachable authority
The distinction between NXDOMAIN and an empty NOERROR catches people out constantly.
When dig disagrees with your system
dig queries the resolver in /etc/resolv.conf directly and ignores /etc/hosts, nsswitch, and local caching.
resolvectl query example.com
getent hosts example.com
getent uses the same path applications do, which makes it the honest comparison. Our dig guide covers the rest.
Installing
sudo apt install dnsutils # Debian and Ubuntu
sudo dnf install bind-utils # Fedora
sudo pacman -S bind # Arch
Verify Your Download
Source releases on downloads.isc.org are published with GPG signatures.