Exploring Domain Information with your Console

Overall dig is an invaluable tool that can help you debug all sorts of DNS related situations, ranging from “Why’s my server not reachable” to “Why does Google Mail not accept my mails” (e.g. when it comes to MX records). Here are some console tricks to dig up some infos about domains.

To find the authorative dns servers for a domain:

dig any example.com

This would tell us that these servers manage this domain:

ns1.dnsserver.com
ns2.dnsserver.com
ns3.dnsserver.com

Now we can find all CNAME and MX records of this domain (no A records!)

dig any example.com @ns1.dnsserver.com

To find out who owns the domain (this might not work, depending on the policy of the registrar):

whois example.com

Finally, you might want to find out some things about an IP address:

To find who the owner of the address is:

whois 123.123.123.123

To find the PTR (or reverse DNS) record:

nslookup 123.123.123.123