EMZETT.
Login

nslookup

In short: A command that asks DNS which IP address or which records belong to a name.

In more detail: nslookup (name server lookup) sends a query to a DNS server and shows the answer. This clarifies whether a problem lies in name resolution. On Linux dig is the more powerful counterpart.

In Depth

Calls

nslookup emzett-digital.com            (A record: IPv4 address)
nslookup -type=MX emzett-digital.com   (mail servers)
nslookup -type=AAAA emzett-digital.com (IPv6 address)
nslookup -type=TXT emzett-digital.com  (text info, e.g. SPF)
nslookup emzett-digital.com 8.8.8.8    (ask another DNS server)
nslookup 76.76.21.21                   (reverse lookup)

Example output

Server:   fritz.box
Address:  192.168.178.1
 
Non-authoritative answer:
Name:     emzett-digital.com
Address:  76.76.21.21

How to read the output

  • Server/Address at the top: the DNS server that answered (usually the router).
  • Non-authoritative answer: The answer came from the cache of a resolver, not directly from the responsible server. This is normal.
  • Several addresses: The service uses several servers (load balancing).
  • “Non-existent domain”: The name does not exist (typo or not registered).
  • “Timed out”: The DNS server does not answer.

Typical use cases

  • ping 8.8.8.8 works but ping emzett-digital.com does not? Then DNS is to blame; use nslookup name 8.8.8.8 to check whether another DNS server knows the name.
  • After a domain change check whether the new address has arrived everywhere.
  • Mail problems: check MX and TXT records (SPF, DKIM).

Interactive mode

nslookup without parameters opens an input prompt where you can enter set type=MX and then names. exit leaves it.

See also: DNS, Network Commands in the CMD, Domain, Ping, ipconfig, IP Addresses, CMD