Oracle Cloud Infrastructure Documentation

Testing DNS Using BIND'S dig Tool

Using the Domain Information Groper (dig) command line tool, you can test against the delegation where your domain is hosted, and you will immediately see whether the change took place without accounting for the cache or TTL (Time to Live) that you have configured.


Windows users can download the tool from BIND’s website. Use Terminal to access dig on Linux and Macintosh systems.

Using dig

Before using BIND's dig tool, you must access or install dig on your system. Once you have access to dig, you can use dig to test your DNS.

To access dig (Mac)
To Install dig (Windows)
To use dig to test your DNS

dig Commands

Command Description Example
dig [hostname] Returns any A record found within the queried hostname's zone. dig
dig [hostname] [record type] Returns the records of that type found within the queried hostname's zone. dig MX
dig [hostname] +short Provides a brief answer, usually just an IP address. dig +short
dig @[nameserver address] [hostname] Queries the nameserver directly instead of your ISP's resolver. dig
dig [hostname] +trace Adding +trace instructs dig to resolve the query from the root nameserver downwards and to report the results from each query step. dig +trace
dig -X [IP address] Reverse lookup for IP addresses. dig -X
dig [hostname] any Returns all records for a hostname. dig any