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:
- Visit nslookup.io and enter the desired domain name.
Click on Find DNS records.
You’ll see the different DNS record types.
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.
Make sure you are connected to a stable internet connection.
Press the Windows logo key type cmd and open the program.
Then type nslookup followed by the domain name.
- You’ll see the DNS records of that domain.
- 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.
- You’ll see the details of that particular DNS record.
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.