Using Nslookup in Windows to Check DNS Records

June 2, 2016 | Views: 12270

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Nslookup, meaning “name server lookup,” is a popular built-in command tool that comes with most versions of the Windows operating system. It’s a handy tool you can use to diagnose the DNS infrastructure of the requested domain name.

By default, the Nslookup command translates word-based domain names to numerical IP addresses (and vice versa).

Other more powerful variants of Nslookup can be used to get information concerning the mail exchange server, FQDN, DNS server responsiveness, DNS configuration, etc. You can effectively check the status of your DNS records and rectify any issues relating to a particular service.

For example, if your domain isn’t able to receive emails well due to problems with your DNS server, you may use the Nslookup command to confirm the domain has a valid MX record and ascertain that that MX record is pointed to the correct email address.

Nslookup can be operated in the command prompt on Windows to give the desired results.

Here are examples using basic Nslookup commands for checking the health of DNS records.


To know your default DNS server and IP address:

Typing Nslookup in your Windows command prompt will give details of your default DNS server and its associated IP address.


To know IP address of any web server:

For example, to query the IP address of Cybrary’s web server, just type nslookup in your command prompt. The outcome will give the DNS server name and its associated IP addresses, as illustrated below:

Here, is the default system domain name server used to query the external server. Thereafter, there are the lookup details for The name server query gave two entries, and, indicating that distributes its server load on different servers.

Notice that the query produced a “Non-authoritative answer.” This indicates that the results come from a server that isn’t the root source for those records. To get an authoritative answer, the primary name server needs to be specified beforehand.


Different types of Nslookup variants:

There are a number of commonly used Nslookup commands, which are used for achieving various objectives. A full list of the most commonly used commands is provided at the end of this article.


Here’s the generic syntax for using Nslookup with a parameter:

  • nslookup <Press Enter>
  • (Set parameter option) <Press Enter>
  • (Enter domain name) <Press Enter>

Let’s see how it can be used with different types of parameters to perform various DNS queries:

Example 1

To lookup for the domain IP address, use the set q=a option query


Notice the answer is the same as that of the earlier query we performed.

Example 2

To lookup all types of data, use the set q=any option query


This query gives the entire domain records of, such as mail exchange records, primary server name, refresh time, etc.

You can also check other types of DNS records using the same methods illustrated above.


Here’s a list of the various Nslookup command queries:


Set Queries Meaning
set q=a To lookup for the IP address of a domain name
set q=MX To find more information about the mail exchange server
set q=SOA To check records of Start-of-Authority of a DNS Zone
set q=any To lookup for all types of data
set q=MB To lookup for the Mailbox domain name
set q=WKS To find more information about the Well-Known Service
set q=CNAME To lookup for the Canonical name


Any questions or comments? Please use the comment section below.

The above article was authored by Alfrick Opidi of

Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. Awesome

  2. Thanks Mr Jasoya,awesome piece

  3. Really helpful, thanks.

Page 2 of 2«12
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge


We recommend always using caution when following any link

Are you sure you want to continue?