How To Verify DNS Record Using “Dig”

This is very basic thing but sometimes useful when you work with DNS management system. One of the way how we can verify the record is using “DIG” command which obviously only available under UNIX, not even Windows 🙂

For you whose not familiar with UNIX, following website might useful instead: which has so many great features to validate about records of DNS. I will let you know how it works on another thread.

Off to the topic

Basic query of dig command is very simple, just put “dig following by domain name” and it will displayed everything about DNS record which belong to the domain. But sometimes you might need to know only specific or for particular needed hence you can customize the command accordingly.

dig {domain_name.tld} a –> only display A record

dig {domain_name.tld} mx –> only display MX record for email

dig {domain_name.tld} txt –> it will display TXT record and SPF as well if present

Above commands will display the records respectively with the details, but if you desire to simplify the result you can use following command:

dig -t txt {domain_name.tld} +short

dig -t mx {domain_name.tld} +short

For displaying CNAME record, there is distinguish command you must understand since by default it could not shown by default. You migh need to know what is the value of the CNAME and following by it’s domain name. As a result you will see the expected value

dig -t cname {cname_value.domain_name.tld} +short

That’s it. Hope this article find you helps.

Leave a Reply

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