nslookup is a command-line DNS query tool that ships with Windows and is also available on Linux and macOS. It sends a query to a resolver you choose and prints the answer, either as a one-off command or in an interactive mode.
Why it matters
Because it is installed on almost every Windows machine, it is often the first tool support teams reach for. It is simpler than dig but shows less: no flags, no per-section detail and limited control over recursion. The first lines of output name the server that answered, which helps spot a wrong resolver. A line saying "Non-authoritative answer" means the reply came from a cache, not the zone's own nameservers.
Example
> nslookup -type=MX example.com 1.1.1.1
Server: one.one.one.one
Address: 1.1.1.1
Non-authoritative answer:
example.com MX preference = 10, mail exchanger = mail.example.com
Interactive mode starts by typing nslookup, then set type=TXT and a name.
Common mistakes
- Ignoring which resolver answered, then trusting a stale result.
- Using the old
set querytypehabit incorrectly. Useset type=. - Treating "Non-authoritative" as an error.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.