EBH DNSCHECK
Your IP:
en

NSLookup Command Guide: Check DNS Records on Windows, macOS and Linux

August 29, 2026
Terminal window showing NSLookup commands for A, MX, TXT and NS DNS records

NSLookup Command Guide: Check DNS Records on Windows, macOS and Linux

NSLookup is a command-line DNS diagnostic tool available on Windows and many other operating systems. It can query a domain, request specific record types and send a query to a selected DNS server.

NSLookup is useful for comparing the default resolver with public or authoritative nameservers during troubleshooting.

Compare NSLookup results with the online DNS Lookup Tool.

Basic NSLookup Commands

Running nslookup followed by a hostname requests its address records through the current default resolver. Adding a DNS server address sends the query directly to that resolver.

Step-by-Step Process

  1. Open Command Prompt, Terminal or a shell.
  2. Run nslookup example.com.
  3. Review the DNS server used for the query.
  4. Request a specific record type.
  5. Query a second resolver for comparison.
  6. Compare the answer, TTL and errors.

Important Concepts

Basic lookup

nslookup example.com

Specific resolver

nslookup example.com 1.1.1.1

MX lookup

nslookup -type=MX example.com

TXT lookup

nslookup -type=TXT example.com

NS lookup

nslookup -type=NS example.com

Interactive mode

Run nslookup without arguments, then use set type= commands.

Common Problems and Mistakes

  • Querying the root domain instead of the affected subdomain
  • Confusing non-authoritative answer with an error
  • Testing only one resolver
  • Ignoring IPv6 records
  • Assuming an address response proves the website is healthy
  • Not checking the authoritative nameserver

Troubleshooting Checklist

  1. Use the exact hostname.
  2. Identify the resolver shown.
  3. Request the correct record type.
  4. Compare at least two resolvers.
  5. Check authoritative NS records.
  6. Test the actual service after DNS resolves.

Frequently Asked Questions

What does non-authoritative answer mean?

The response came from a recursive resolver or cache rather than directly from the domain’s authoritative server.

Can NSLookup check MX and TXT records?

Yes. Use the -type option or interactive mode.

Is NSLookup the same as a global DNS checker?

No. NSLookup normally tests from one device and resolver; a global checker compares multiple locations.

Conclusion

NSLookup Command Guide is an important topic for anyone managing websites, networks or online services. Use the diagnostic steps above to separate local-device, resolver, authoritative DNS and application problems.

Compare NSLookup results with the online DNS Lookup Tool.