How to use Dig for dns troubleshooting

Some really neat tricks when troubleshooting DNS using Dig and other tools, please see below and let me know if there are any other tricks you would like to see.

How to check nameserver for a domain-name using Dig?

Just return the DNS without all the verbose output using Dig

if you add the +short to the end of the query it will omit all the verbose output and give you something like the below:

How to list all DNS records in a domain using Dig?

Query against different DNS servers using Dig?

The below example shows how you can use dig to use a different dns server for your query rather than your system default:

How to track a DNS propagation change across global DNS servers

You can use this really cool website which allows you to track a dns change you may have done and see how far it has propagated:
https://www.whatsmydns.net/

DNS Reverse Look-up

Bulk DNS Query

Query multiple websites using a file with DNS names:
You can perform a bulk DNS query based on the data from a file.

First, create a sample dnsnames.txt file that contains the website that you want to query.

Next, execute dig -f as shown below, which will perform DNS query for the websites listed in the dnsnames.txt file and display the output.

You can also combine record type with the -f option. The following example displays the NS records of multiple websites that are located in the dnsnames.txt file.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *