Dig commands cheat sheet
Dig (Domain Information Groper) is a command-line network administration tool used for querying DNS servers. Here are some common dig commands and their uses. Official BIND 9 man page available here.
Query a single domain name
dig anyplanet.org
Reverse DNS Lookup (Finds the hostname for an IP address)
dig -x 95.217.183.234
Query name servers
dig anyplanet.org NS
To directly query a specific DNS server (Google, more public dns servers available here)
This command is useful for checking DNS propagation
dig @8.8.8.8 A anyplanet.org
Checking SOA files
dig anyplanet.org SOA
Just the serial number
dig @ns1.anyplanet.org SOA domainparkki.com +short | awk '{print $3}'
Which mail servers are connected to the domain
dig anyplanet.org MX +short