Shell Script To Check A Record For Given Domain or Hostname On All Nameservers

in Categories Domain last updated July 30, 2008

This shell script uses host DNS lookup utility to check A record for given domain / host against all nameservers. It is useful to verify A record and provides warning if ‘A’ record is not same on all master / slave nameservers.

This script also demonstrate use of bash shell array.

How do I use this script?

Find out A record for domain on all 3 nameservers:
$ ./ 3
Sample output:

Share this on: