What Is nslookup and How to Use It

Aquibur Rahman
ByAquibur Rahman

6 mins read

Have you ever wondered what your domain IP address is? You may already know that whenever users enter a domain name in the search bar, the browser directs them to the domain’s IP address. So what is yours?

To find out, you need to dig into your Domain Name System (DNS) settings which can take a while and needs technical proficiency. But with the help of nslookup (Name Server Lookup), you can check DNS records quickly without having deep technical knowledge. So, let's discuss what nslookup is and how you can benefit from it.

What is nslookup?

As the name suggests, nslookup is a method to find DNS records of a domain name. Every domain name has a set of DNS records, and you can find them with nslookup, including important email records like MX (Mail Exchange) records that help you receive important emails that are sent to your domain.

Use Cases for nslookup

Nslookup is a powerful command-line tool used for querying DNS (Domain Name System) to obtain domain name or IP address information. It’s essential for troubleshooting network issues and understanding domain resolutions. Here are some practical use cases of nslookup to illustrate its capabilities.

  • Nslookup is mainly used for troubleshooting DNS problems. Since you can check many DNS record types with this method, you can also check if there is some inconsistency.

  • If you’re not receiving emails to your domain and suspect your MX records have errors, you can cross-check with nslookup. If you find out that your MX record isn't pointing to the right domain, you can fix that as soon as possible to start receiving emails to your domain again.

  • You can also check the PTR record that helps inbox providers want you to have so they can check the legitimacy of your emails. If you find inconsistencies, you must fix them as soon as possible to minimize the negative impact on your email deliverability.

List of nslookup commands

Nslookup command is a network utility used to retrieve a domain’s information, including its IP address and DNS record. Using various nslookup commands, you will get different information about your domain.

Here is a list of commonly used nslookup commands:

Nslookup command Function
Name Retrieves information about a domain name or hostname using the default DNS server.
Server name Sets a different default DNS server using the current one’s information.
Root Sets the DNS root server as the default.
Set type= record type Queries for a specific type of DNS record, such as A, MX, PTR, or SOA. Using ANY will show all available records from the server.
Set debug Provides detailed information about debugging for each query and its corresponding response.
Set recurse Instructs the DNS server to query other servers if it cannot resolve the information itself.
Help Displays a list of available nslookup commands and their descriptions.
Exit Exits the nslookup tool and returns to the command-line interface.

How to check DNS records with nslookup

There are two methods we can employ to check DNS records with nslookup. Let’s take a look at both of them.

Online tools

We will use nslookup.io to make checking DNS records super easy for you. Follow these steps to check DNS types of different domains:

  1. Visit nslookup.io and enter the desired domain name.

Enter your domain name

  1. Click on Find DNS records.

  2. You’ll see the different DNS record types.

Find the DNS records you're looking for

Note that you can also filter these results by different servers, including Cloudflare DNS, Google DNS, Open DNS, Authoritative, and Local DNS.

Command prompt

Here is how to check your DNS records with the nslookup command in Windows.

  1. Make sure you are connected to a stable internet connection.

  2. Press the Windows logo key type cmd and open the program.

  3. Then type nslookup followed by the domain name.

A rectangle showing command line

  1. You’ll see the DNS records of that domain.

A rectangle showing Nslookup results using command line

  1. If you want to query a specific record, type nslookup -type=[DNS record type] domain. Here, replace the [DNS record type] with A, MX, or any other record you want to know and the domain name.

An image showing nslookup command of various record types

  1. You’ll see the details of that particular DNS record.

An image showing nslookup of various record types

Supported DNS record types

The nslookup command supports several DNS record types. To use these record types with nslookup, you generally specify the record type using the “query” option followed by the record type and the domain name you're interested in.

As previously discussed, there are two main ways to use nslookup. The record types supported by both the aforementioned methods are different. Here are the supported DNS record types for each:

1. Windows Command line

  • A: Specifies a computer's IP address.

  • ANY: Specifies a computer's IP address.

  • CNAME: Specifies a canonical name for an alias.

  • GID: Specifies a group identifier of a group name.

  • HINFO: Specifies a computer's CPU and type of operating system.

  • MB: Specifies a mailbox domain name.

  • MG: Specifies a mail group member.

  • MINFO: Specifies mailbox or mail list information.

  • MR: Specifies the mail rename domain name.

  • MX: Specifies the mail exchanger.

  • NS: Specifies a DNS name server for the named zone.

  • PTR: Specifies a computer name if the query is an IP address; otherwise, it specifies the pointer to other information.

  • SOA: Specifies the start-of-authority for a DNS zone.

  • TXT: Specifies the text information.

  • UID: Specifies the user identifier.

  • UINFO: Specifies the user information.

  • WKS: Describes a well-known service.

Source: Microsoft Ignite

2. Online tools

Although different online nslookup tools like Broad Band Tools and Web Wiz may show you different types of records, we are going to use nslookup.io, it shows you the following types of DNS records:

  • A

  • AAAA

  • CNAME

  • TXT

  • NS

  • MX

  • SOA

Source: Nslookup

Takeaways

The world of DNS records is complex, time-consuming, and complicated. Nslookup makes the process of checking DNS records a bit easier.

Making changes to your DNS is not easy, and waiting for those changes to get reflected is even harder. People waste too much time waiting for DNS changes to be reflected because they aren't familiar with the concept of DNS propagation. Read our guide to familiarize yourself with the A-Z of DNS propagation.

FAQs

The nslookup command is used to query Domain Name System (DNS) records. It helps to find IP addresses associated with domain names or vice versa and can provide information about DNS servers and their configuration. It's useful for troubleshooting network issues.

Yes, nslookup is a DNS tool. It queries DNS servers to retrieve information about domain names, such as their IP addresses or DNS records. It's commonly used for troubleshooting and diagnosing DNS-related issues.

Nslookup queries DNS servers to retrieve information about domain names, such as their IP addresses and other DNS records. It helps diagnose DNS issues and verify domain name resolutions.

Ping tests the reachability of a networked device by sending ICMP Echo Request packets and measuring the response time. It helps determine if a host is reachable and assess network latency. In summary, nslookup focuses on DNS queries, while ping checks connectivity and response times.

The most used nslookup command is simply querying a domain name. For example, running nslookup on google.com will provide the IP address associated with Google's domain. This basic query helps users quickly find out the IP address of a given website.

What should you do next?

You made it till the end! Here's what you can do next to grow your business:

2_1_27027d2b7d
Get smarter with email resources

Free guides, ebooks, and other resources to master email marketing.

1_2_69505430ad
Do interactive email marketing with Mailmodo

Send forms, carts, calendars, games and more within your emails to boost ROI.

3_1_3e1f82b05a
Consult an email expert

30-min free email consultation with an expert to fix your email marketing.

Table of contents

chevron-down
What is nslookup?
Use Cases for nslookup
List of nslookup commands
How to check DNS records with nslookup
Supported DNS record types
Takeaways

Fresh Marketing Ideas, Every Week.

Get the latest marketing roundup & news

Get 3X email conversion
with Mailmodo

Check.svg

Create & send interactive emails without coding

Check.svg

Put revenue on auto-pilot with pre-built journeys

Check.svg

Save time with AI-powered email content creation

Experience world’s only interactive email marketing platform

Trusted by 10000+ brands

Group_1110166020_1_6fb9f2bd9a
Group_1110165532_1_bf39ce18b3
Ellipse_Gradientbottom_Bg
Ellipse_GradientLeft_Top
gradient_Right