Skip to content
Search

Dig

lastmod 2026-02-05created 2021-10-286 edits

dig (domain information groper) is a network administration command-line interface tool for querying Domain Name System (DNS) name servers.

dig is useful for network troubleshooting and for educational purposes. dig can operate in iterative command-line mode or in batch mode. If a specific name server is not specified in the command, it uses the operating system's default resolver configured in the resolv.conf file. If the query has no parameters, it queries the DNS root zone.

dig supports internationalized domain name (IDN) queries.

dig is a part of the BIND domain name server software. dig replaces older tools such as nslookup and host.

Usage

Appending ANY prints all records.

dig yourdomain.com ANY

The output looks like this:

; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> yourdomain.com ANY
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40760
;; flags: qr rd ra; QUERY: 1, ANSWER: 9, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;yourdomain.com.                  IN      ANY

;; ANSWER SECTION:
yourdomain.com.           3600    IN      A       ...
yourdomain.com.           3600    IN      A       ...
yourdomain.com.           3600    IN      A       ...
yourdomain.com.           3600    IN      SOA     ...
yourdomain.com.           3600    IN      MX      ...
yourdomain.com.           3600    IN      MX      ...
yourdomain.com.           3600    IN      TXT     ...
yourdomain.com.           86400   IN      NS      ...
yourdomain.com.           86400   IN      NS      ...

;; Query time: 60 msec
;; SERVER: 127.0.0.53#53(127.0.0.53) (TCP)
;; WHEN: Fri May 03 15:54:47 KST 2024
;; MSG SIZE  rcvd: 289

See also

Favorite site

author Zer0 sitemap