# Using dig¶

Dig is a utility that probes the domain name system (DNS). It’s the most essential tool for understanding what’s right and what wrong with your DNS server. If you don’t use dig you’ll suffer with problems in DNS.

## Testing DNS with dig¶

There are easy ways to lookup IP addresses and there are helpful ways to lookup IP addresses. If you’re an administrator and you want to know what’s really going on there’s only one tool for you: dig. Dig can perform any DNS query, iterative or recursive and inform you of the complete result. Dig can also ask any server, not just the one your system is configured to use. This gives you the information you need to fix problems with your DNS configuration.

For a full guide to dig, use it’s manual page. This page has some common recipes.

Tell dig to use a particular nameserver (that’s not necessarily the system’s nameserver). This is very useful for debugging your bind9 configuration before you tell your hosts to use your internal nameserver:

dig <query> @<namserver-to-use>


Here’s an example where I want to test my CIS 192 server from the server itself: