Mastering DNS Queries with nslookup: 10 Essential Commands
This guide walks you through ten practical nslookup commands for retrieving A, NS, SOA, MX, any, server-specific, reverse, PTR, timeout, and debug DNS records, complete with example syntax and screenshots to help you troubleshoot and verify DNS configurations.
Source: Network Engineer Alon
1. How to Find a Domain's A Record
Use nslookup to list A records and their IP addresses.
$ nslookup example.com2. How to View a Domain's NS Records
Checking NS records reveals the authoritative name servers for the domain.
$ nslookup -type=ns example.com3. How to Query a Domain's SOA Record
The SOA record shows the start of authority and zone information.
$ nslookup -type=soa example.com4. How to Find MX Records for Email Exchange
MX records list the mail servers responsible for receiving email for the domain.
$ nslookup -query=mx example.com5. How to Retrieve All Available DNS Records
Querying with type=any returns every DNS record type for the domain.
$ nslookup -type=any example.com6. How to Check a Specific DNS Server's Responsiveness
Use nslookup to query a particular DNS server and see if it answers.
$ nslookup example.com ns1.nsexample.com7. How to Perform a Reverse DNS Lookup
Reverse lookup verifies which domain name is associated with an IP address.
$ nslookup 10.20.30.408. How to View PTR Records
PTR records map an IP address back to its domain name; they are stored under the in-addr.arpa zone.
$ nslookup -type=ptr 96.96.136.185.in-addr.arpa9. How to Adjust the Query Timeout Interval
Modify the timeout (in seconds) to give the DNS server more or less time to respond.
$ nslookup -timeout=20 example.com10. How to Enable Debug Mode
Debug mode provides detailed information about the query process and responses.
$ nslookup -debug example.comSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
