Checking DNS with dig

There are many DNS servers in the world. When you type hayato-iriumi.net in your browser, your browser goes out to your ISP’s DNS server or the specified DNS server to resolve it to the mapped IP address. (It’s a little more complicated actually but you get the idea)

When you change the A Record (IP address mapping to the name), it takes some time for it to propagate around the world. When you want to see which IP address certain domain name is resolved to, you can run the following command.

 dig +short hayato-iriumi.net

You can specify the DNS server to have it resolve the name.

dig +short hayato-iriumi.net @8.8.8.8

You should see the IP address as a result or no result if the DNS server doesn’t have the name mapped to the IP address yet. dig is a very useful command to check the DNS resolution in most of the Linux type of OS (dig is available on Linux Subsystem on Windows as well).

Author: admin

A software engineer in greater Seattle area

Leave a Reply

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