Skip to content

DNS Tools

Note

Machine translation from the German version. In case of doubt, the content of the German version shall prevail.

dig (Linux/macOS)

dig (Domain Information Groper) is a powerful command-line tool for querying DNS name servers. It is considered the standard replacement for older tools like nslookup.

Basic query

To query the A record (IP address) of a domain, the following command can be used:

dig ruhr-uni-bochum.de

Query specific record types

Specific MX, TXT or other records can be queried.

# Mailserver abfragen
dig ruhr-uni-bochum.de MX

# TXT-Records (z.B. für SPF) abfragen
dig ruhr-uni-bochum.de TXT

# IPv6-Adresse (AAAA) abfragen
dig ruhr-uni-bochum.de AAAA

To determine the assignment of a hostname to an IP address, the option -x is used.

dig -x 134.147.167.1

DNSSEC query

To request DNSSEC records (e.g., RRSIG), the +dnssec option is used:

dig ruhr-uni-bochum.de +dnssec

Query specific nameserver

If the query is to be made via a specific server (e.g., a name server of the RUB), the @ symbol is used:

dig @1.1.1.1 ruhr-uni-bochum.de

Trace the path of dissolution

To troubleshoot, the resolution path can be traced from the root servers to the authoritative server:

dig ruhr-uni-bochum.de +trace


Resolve-DnsName

Under Windows, Resolve-DnsName is the modern PowerShell cmdlet for DNS queries. It provides more detailed information than the classic nslookup.

Basic query

The standard query for a domain is done via the parameter -Name.

Resolve-DnsName -Name ruhr-uni-bochum.de

Query specific record types

Via the -Type parameter, specific entries can be requested:

# Mailserver abfragen
Resolve-DnsName -Name ruhr-uni-bochum.de -Type MX

# TXT-Records abfragen
Resolve-DnsName -Name ruhr-uni-bochum.de -Type TXT

Query specific nameserver

To use a specific DNS server for the query, the -Server parameter is used:

Resolve-DnsName -Name ruhr-uni-bochum.de -Server 1.1.1.1

Ignore hosts file

To ensure that the result comes from the DNS server and not from the local hosts file:

Resolve-DnsName -Name ruhr-uni-bochum.de -NoHostsFile

DNSSEC query

The query of DNSSEC information is done via the parameter -DnssecOk.

Resolve-DnsName -Name ruhr-uni-bochum.de -DnssecOk