How to check various DNS records with Dig?

To check various DNS records is a need for every administrator. Purposes are many to check if you already added a specific record to your DNS, know how DNS propagation is going, get the TTL of a record, etc.

DNS records have their own objectives. In any case, the Dig command can be very useful for you.

10 Most used Dig commands

What are A and AAAA records for?

The A record, Address mapping record, or DNS host record contains a hostname and its associated IP address.

The AAAA has the same purpose and conceptually is similar to the A record. The difference is that the A record resolves a domain name with an IPv4 address type. And the AAAA records resolve a domain name with an IPv6 address

How to check A and AAAA records with Dig?

To check A or AAAA records with Dig is easy. Open the Terminal. Then, type the command following this syntax. First is the Dig command. After it, type the hostname you will check. And finally, add the DNS record type you are interested in. It will look this way: 

dig A

dig AAAA

What is SOA record for?

The Start of Authority or SOA saves metadata related to a specific domain. For example, it points to the authoritative name server for the current DNS zone. It also provides information like the serial number of the domain, contact data of the domain administrator, the frequency for the DNS information of the zone to be updated, and the date of the last update for associated records.

How to check SOA record with Dig?

Just open the Terminal. Then, type the command followed by the hostname, and finally, add the DNS record type you will check. 

dig SOA

What is MX record for?

The Mail Exchanger or MX record identifies the e-mail server (Simple Mail Transfer Protocol) for a specific domain that must be used for routing incoming messages.

How to check MX record with Dig?

Go to the Terminal. Type the command, add the hostname, and the DNS record type, MX in this case. 

dig MX

What is NS record for?

A Name Server or NS record contains the name servers for a specific domain. This record points to the DNS servers that are in charge of managing the domain’s DNS records. We can say that NS records point the Internet to the exact place to go to obtain a domain’s IP address.

How to check NS record with Dig?

Open the Terminal. Type dig, then the hostname, and at the end, specify the type of record you want to check, NS record. 

dig NS

What is TXT record for?

A TXT record saves text data, readable for machines, usually to keep certain configurations from specific settings of different DNS records. For example, DKIM or SPF records that decrease e-mail spam, verify keys to prove the domain’s ownership, etc.

How to check TXT record with Dig?

Open the Terminal, type Dig, add the hostname, and TXT. 

dig TXT

What is CNAME record for?

The Canonical Name or CNAME record can map an alias hostname to a canonical hostname. It usually maps a subdomain like www or mail to the canonical domain that already has all the DNS records.

How to check CNAME record with Dig?

Just open the Terminal, type Dig, then the hostname, and CNAME. 



Here you have it! To check DNS records is not hard if you use the Dig command.

Leave a Reply

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