Open In App

How to Check DNS Records Using Basic NsLookup CMD?

Last Updated : 24 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

The NsLoookup command is a utility that can be used when trying to troubleshoot problems with networking or test DNS configurations. It allows querying the DNS server for domain information, such as which IP addresses are associated with it, mail server information, and other DNS records DNS, or Domain Name System, is essential to the operation of the Internet. It translates human-readable domain names into the numerical IP addresses computers use to talk to each other. Checking DNS records is of great use in troubleshooting connectivity, making sure the domains are set up properly, and confirming DNS settings.

One of the effective ways to query DNS servers for relevant information regarding a domain is by using the NsLoookup command. This utility, upon use, returns the details regarding IP addresses, mail server settings, and lots more from a DNS server, making it an invaluable tool for any networked admin or user.

What is DNS?

DNS is the system that converts domain names into the IP addresses computers use to identify each other on the internet. DNS works like the internet’s phonebook, enabling users to access websites using the human-readable names of the websites rather than having to remember complex IP addresses. It will resolve the queries by arguing with DNS servers, and it is going to make sure the proper communication between devices over the internet is smooth. Without DNS, one would have to type numerical IP addresses for every website visited.

What is NsLoookup?

It’s a command line utility that queries DNS records about an IP address or domain. Examples of some of the DNS records shown from its use include A, AAAA, MX, and so on. Network troubleshooting, verification of DNS configuration, and the derivation of domain-specific information from a DNS server are some of the uses of this tool. Essentially it will let users interact directly with DNS servers and work on various operating systems, including Windows, macOS, and Linux.

Why We Use NsLoookup Command?

The NsLoookup command is used to perform network troubleshooting, fetch DNS information, and verify domain configuration. With it, it’s also possible to verify any mail server records, find out the IP address of any given domain, and query other information from DNS data. This helps in finding DNS errors and fixing slow or unavailable websites, making sure that a domain resolves. Similarly, it also helps network administrators confirm that DNS settings are functioning or working as expected after some changes.

Why Do We Check DNS Records?

It helps verify whether the DNS configurations right from mail server settings using MX records to domain forwarding using CNAME records are appropriately set. Checking DNS records is highly important in troubleshooting website outages, ensuring email deliverability, and confirming what changes have been made on a domain. Checks at regular intervals would avoid any probable issues arising from incorrect DNS propagation or misconfigured records. It also helps in the understanding and solving of network-based problems.

How to check DNS records using basic NsLoookup CMD

Open the Command Line > Basic NsLoookup Syntax >> Specific DNS Record Querying >>> Using Specific DNS Servers >> Interactive Mode

Step 1. Open the Command Line

Access to the command line interface is required to use NsLoookup

  • For Windows: Press Windows + R, type in cmd, and press Enter
  • For macOS: Open Terminal from Applications or Spotlight
  • For Linux: Open the Terminal from your applications or use Ctrl + Alt + T
Open-CMD-prompt-1-copy-2
Open the Command Line

Step 2. Basic NsLoookup Syntax

The simplest way to conduct an NsLoookup is to query a domain name. Use the following command

NsLoookup <domain-name>

For example:

NsLoookup google.com
  • Output This will return the default DNS server used to query the domain and associated IP addresses of the domain
add-the-cmd-2
Basic nslookup Syntax

Step 3. Specific DNS Record Querying

For querying specific DNS records, such as A, MX, CNAME, or TXT records, you need to specify the type of record you need

  • A Record (IPv4 Address)
NsLoookup -type=A <domain-name>
  • MX Record (Mail Exchange)
NsLoookup -type=MX <domain-name>
  • CNAME Record (Canonical Name)
NsLoookup -type=CNAME <domain-name>
  • TXT Record (Text Data)
NsLoookup -type=TXT <domain-name>

Step 4. Using Specific DNS Servers

  • By default, NsLoookup uses the DNS server configured on your system. To query a domain using a specific DNS server include the DNS server address after the domain name.
NsLoookup <domain-name> <DNS-server-IP>
  • For example, we use the Google DNS server
NsLoookup google.com 8.8.8.8
Using-Specific-DNS-Servers-4
Using Specific DNS Servers

Step 5. Interactive Mode

  • You can enter the interactive mode of NsLoookup to perform multiple queries without reopening the terminal. In the command line, type ‘NsLoookup’ followed by one query and then another
NsLoookup
> google.com
> set type=MX
> yahoo.com
  • Use the exit to quit interactive mode
Interactive-Mode-5
Interactive Mode

Conclusion

NsLoookup is a very basic but helpful command to query DNS records. Mastering basic syntax and learning about different types of DNS records will allow you to troubleshoot and also verify the domain configuration rather efficiently.

How-to-Check-DNS-Records-Using-Basic-NsLookup-CMD
How to Check DNS Records Using Basic NsLookup CMD

Article Tags :

Similar Reads