DIG stands for Domain Information Groper
(DIG) is a network administration command-line tool for querying Domain Name System (DNS) name servers. It is useful for verifying and troubleshooting DNS problems and also to perform DNS lookups and displays the answers that are returned from the name server that was queried .
DIG is used for various purposes, such as finding the IP address of a domain name, finding the mail server of a domain name, finding the authoritative name server of a domain name, finding the reverse DNS of an IP address, tracing the DNS resolution path, and more .
DIG works by sending DNS queries to name servers and retrieving the responses. It follows the DNS resolution process, which involves several steps. By default, DIG sends the DNS query to name servers listed in the resolver (/etc/resolv.conf) unless it is asked to query a specific name server. DIG can also specify the type of query requested, such as A record, MX record, SOA record, or any other types. DIG can also control the behavior of the query and the output by using various options and flags .