Check DNS records in terminal

Currently I’m working on a big server migration. Where a lot of small sites get moved over. And a lot of the domain names are registered and managed at third parties.
So after each move I have to check a lot of DNS records to see if the move is final.

Usually I use the mxtoolbox which is great to check DNS records.
But I needed a more bulk option for this mass migration.

Enter the dig command

Dig commands

Check A record:

dig A +short

Check AAAA record (ipv6)

dig AAAA +short


dig CNAME +short

Check A, AAAA and CNAME all at once.

dig AAAA CNAME A +short

These commands return very compact ip’s or domainnames.
Which are easy to scan.

I’m not sure if these are cached.