dig (domain information groper) is a network administration command-line tool for querying Domain Name System (DNS) servers.
dig is useful for network troubleshooting and for educational purposes. dig can operate in interactive command line mode or in batch mode by reading requests from an operating system file. When a specific name server is not specified in the command invocation, it will use the operating system's default resolver, usually configured via the resolv.conf file. Without any arguments it queries the DNS root zone.
dig supports Internationalized Domain Name (IDN) queries.
dig is part of the BIND domain name server software suite. dig was initially planned to supersede older tools such as nslookup and the host program; however, it has instead become a complementary tool.
Example usage

In this example, dig is used to query for any type of record information in the domain example.com:
The number 172719 in the above example represents the time to live value.
Queries may be directed to designated DNS servers for specific records; in this example, MX records:
See also

- List of DNS record types
- whois
References

General
- Paul Albitz and Cricket Liu. DNS and BIND, 5th Edition. Nutshell Series. O'Reilly and Associates, Inc., 2006.
External links

dig
 â" BIND 9- How to use dig to query DNS name servers
