ipdetecto.com logo
ipdetecto.com
My IPSpeed
Knowledge Hub
HomeKnowledge HubWhat Does Nslookup Do
© 2026 ipdetecto.com
support@ipdetecto.comAboutContactPrivacyTermsllms.txt
Basics
5 MIN READ
Apr 19, 2026

What Does nslookup Do?

nslookup queries DNS servers for records (A, AAAA, MX, PTR, etc.) in interactive or one-shot mode; it shows which server answered and helps debug split-DNS and resolver choice—distinct from dig output style but overlapping in purpose.

Definition

nslookup is a DNS troubleshooting client. Given a name or address, it asks a DNS server for resource records—commonly A/AAAA forward lookups or PTR reverse lookups—and prints the response. It can run in non-interactive one-liner mode (good for scripts) or interactive mode where you change servers and query types between prompts.

What you see

Output usually includes the resolver that answered (defaults to your OS-configured DNS unless you override), the answer section, and sometimes authoritative vs non-authoritative flags. Misreading server lines causes confusion in split-tunnel VPNs where corporate resolvers differ from home ISP DNS.

Common patterns

GoalExample shapeNote
Forward Anslookup example.comUses system resolver defaults
Pick servernslookup example.com 1.1.1.1Bypasses local resolver for this query
MX / TXTInteractive set type=mxSyntax varies slightly by OS build
Reverse PTRnslookup 203.0.113.4Depends on in-addr.arpa / ip6.arpa delegation

nslookup vs dig

Both query DNS, but dig (BIND) output is more uniform and script-friendly (+short, +trace). nslookup historically mirrored resolver libraries differently across vendors. For automation on Linux, prefer dig or kdig; nslookup remains useful on Windows boxes and in tutorials.

Troubleshooting mindset

Always record which resolver answered, whether DNSSEC validation is in play, and whether split DNS means internal names fail on public resolvers. Follow with ping/curl only after DNS returns sensible answers.

Related: How DNS works, nslookup and dig on Linux, DNS troubleshooting commands, Windows ipconfig explained.

Frequently Asked Questions

Q.Does nslookup use the same DNS as my browser?

Usually the OS resolver stack, which browsers may or may not use depending on DNS-over-HTTPS settings. If results differ, compare nslookup against the browser's secure DNS configuration.

Q.What does non-authoritative answer mean?

The response came from a resolver's cache or recursion, not directly from the authoritative nameservers for the zone—normal for public queries.

Q.Why does nslookup show a timeout?

The chosen server did not respond in time—firewall UDP/TCP 53 blocked, server down, or captive portal interference. Retry with another resolver or dig +tcp.

Q.Can nslookup trace delegation like dig +trace?

nslookup is weaker for iterative delegation walks; use dig +trace or drill for authoritative chain debugging.

Q.How do I query a specific record type in nslookup?

Enter interactive mode, run set type=mx (or txt, ns, soa, etc.), then type the name. Exact keyword spelling can vary—use ? or help in interactive mode when available.

Q.Is nslookup deprecated?

Some vendors discourage it in favor of dig, but Windows and many distros still ship it. Deprecation is organizational preference more than disappearance.

Q.Why does internal hostname fail on 8.8.8.8?

Split DNS: internal zones exist only on corporate resolvers. Query the internal DNS server or VPN-provided resolver instead of a public one.

Q.Does nslookup validate DNSSEC?

Behavior depends on platform resolver support and flags; for explicit DNSSEC status use dig +dnssec or delv rather than assuming nslookup output alone.
TOPICS & TAGS
what does nslookup donslookup set typeDNS query toolnslookup vs dignslookup serverPTR lookup