Usage

ndig [options] <domain>

Options

OptionDescription
-t, --type [type...]Record type(s) to query
-s, --short [type...]Record type(s), short output (value only)
-n, --nameserver [ns]Nameserver to query (default: authoritative via SOA)
-v, --verboseVerbose output
-u, --unsortedDisable sorted output
-V, --versionPrint version
-h, --helpShow help

Supported Types

Standard:

AAAAACNAMEMXNSPTRSOASRVTXT

DNSSEC:

RRSIGDNSKEYDSNSECNSEC3CDNSKEYCDS

Shorthands: ALL (all standard types), DNSSEC (all DNSSEC types)

Nameserver Aliases

cloudflaregoogleopendnsquad9verisigncomodo

Or pass any IP address or hostname directly.

Examples

# All records for a domain (queries authoritative NS automatically)
ndig example.com

# A records only
ndig -t A example.com

# MX records, values only
ndig -s MX example.com

# Multiple types
ndig -t A AAAA MX example.com

# Query via Google's public DNS instead of authoritative
ndig -n google -t A example.com

# All DNSSEC records
ndig -t DNSSEC example.com

# Short output for scripting
ndig -s A example.com