Name server lookup (nslookup) is a command-line tool that allows you to find the internet protocol (IP) address or a domain name system (DNS) record of a particular domain name.
This tool is included with Microsoft Windows, and you can use it through the command prompt. NSLOOKUP can also be used for DNS propagation and resolution with different servers and troubleshooting steps.
In this guide, we will understand how to use the NSLOOKUP tool that is provided with Microsoft Windows.
Steps to Use the NSLOOKUP:
To use the NSLOOKUP tool, go to Start and type cmd in the search field to open the command prompt. Or, you can go to Start > Run > type cmd or command.
1. Simply type nslookup and press Enter. Your local DNS server and its IP address will be displayed.
2. You can also specify the DNS server (IP address), type of record and domain name.
To display the above parameters, type nslookup and domain name, and the command prompt will return the A record for the domain you run a particular query for:
Here, wikipedia.org is the domain name.
3. Now, type nslookup -q=XX, where XX denotes the DNS record. The available types of DNS records are CNAME, A, TXT and MX.
A: Responsible for mapping a domain name to an IP address.
CNAME: Provides information about the domain name’s alternative.
MX: A mail exchange (MX) record is basically a DNS record type that generally shows where the emails for a domain need to be routed.
TXT: TXT stands for text and lets the owner of the domain store text values in the DNS.
To exit the tool, type exit.
4. For using nslookup as a troubleshooting tool, you can set the specific type of record to lookup for a domain name by using the command:
-type=record_type where record_type is MX, CNAME, PTR, NS, ANY.
Type the nslookup -type=ns domain_name, where domain_name is the domain for your query and press Enter. The tool will then display the nameservers for the domain you have specified.
Conclusion
Using the different nslookup commands, you will get all the information about your domain. It can also help you to troubleshoot DNS-related issues. In short, the nslookup tool provided with Windows offers great functionalities and is beneficial.
Hope this article has cleared the concepts to use the nslookup tool provided with Windows.