This command is a fundamental utility for anyone who works on the web. It’s your direct line to the DNS, allowing you to ask critical questions about any domain. As web professionals, we might build incredible sites using platforms like Elementor on top of the powerful WordPress CMS. But that site is useless if no one can find it. This is where DNS comes in, and nslookup is our primary tool for verifying that it’s all working correctly.

Key Takeaways

  • What it is: nslookup (which stands for Name Server Lookup) is a built-in command-line tool for querying the Domain Name System (DNS).
  • Primary Function: It translates human-readable domain names (like elementor.com) into the computer-readable IP addresses (like 123.45.67.89) that servers use to communicate.
  • Why We Use It: Web creators and IT professionals use nslookup to diagnose DNS problems, verify new domain setups, check email record configurations, and confirm that DNS changes have propagated.
  • Two Modes: The tool operates in two distinct modes. Non-interactive mode is for single, fast lookups. Interactive mode is a powerful environment for running multiple, complex queries and troubleshooting.
  • The Core Use Case: Understanding nslookup is essential for troubleshooting why a new website, like one on Elementor Hosting, might not be visible to everyone after launch.

What is DNS? A (Brief) Refresher for Web Professionals

Before we can master nslookup, we have to be on the same page about what we’re looking up. The Domain Name System (DNS) is, quite simply, the phonebook of the internet.

Humans remember names. Computers remember numbers. When you type elementor.com into your browser, your computer has no idea where to find it. It needs an IP address, which is a numerical label like 34.149.196.48.

Your computer’s first step is to ask a Recursive Resolver. Think of this as your local librarian. This server, usually run by your Internet Service Provider (ISP), has a massive cache of recently looked-up names. If it has the answer, it gives it back to you immediately.

If the resolver doesn’t know the answer, it goes on a quest. It finds the Authoritative Nameserver for the domain. This is the official phonebook for that specific domain, the single source of truth. It asks that server for the correct IP address, brings the answer back to your computer, and saves a copy in its cache for the next person who asks.

This entire, lightning-fast process is what allows you to connect a free domain name to your web server’s IP address. nslookup lets us query both the local resolver and the authoritative server to see exactly what each one knows.

Understanding the Core DNS Record Types

When you use nslookup, you are asking for specific DNS records. A domain’s “phonebook entry” isn’t just one line item. It’s a collection of different record types that tell the internet how to handle web traffic, email, and more.

Understanding these records is the most important part of using nslookup effectively.

A Record (Address Record)

  • What it is: This is the most fundamental record. It points a hostname (like yourdomain.com) to an IPv4 address (e.g., 192.168.1.1).
  • Why it matters: This is the primary record for your website. It’s what directs a visitor’s browser to the server that holds your website files. When you set up Elementor Hosting, the “A Record” is what you point to the IP address they provide you.

AAAA Record (Quad-A Record)

  • What it is: The modern version of an A record. It points a hostname to an IPv6 address, which is a much longer, more complex string (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
  • Why it matters: The internet has run out of IPv4 addresses. IPv6 is the future, and most modern web infrastructure uses both A and AAAA records.

CNAME Record (Canonical Name)

  • What it is: A CNAME record is an alias. It points a hostname to another hostname, not an IP address.
  • Why it matters: This is most commonly used for the www subdomain. You point www.yourdomain.com (the alias) to yourdomain.com (the canonical, or “real,” name). That way, if your IP address ever changes, you only have to update the A record for yourdomain.com, and the www alias will follow automatically.

MX Record (Mail Exchange)

  • What it is: This record specifies the mail servers responsible for receiving email on behalf of your domain.
  • Why it matters: This is absolutely essential for email deliverability. If your MX records are wrong, you will not receive any email. These records also have a priority number, which tells the sending server which mail server to try first (lower number = higher priority).
  • Example: If you use Google Workspace, your MX records point to servers like aspmx.l.google.com.

NS Record (Name Server)

  • What it is: This record identifies the authoritative name servers for the domain.
  • Why it matters: This is the record that tells the rest of the internet “who to ask” for all your other records. When you buy a domain from a registrar and point it to your web host, you are changing the NS records to point to your host’s name servers.

TXT Record (Text Record)

  • What it is: This record holds arbitrary, human-readable text. It was originally for notes, but it’s now used for critical verification tasks.
  • Why it matters: You use TXT records to prove you own a domain (for Google Search Console, Microsoft 365, etc.). They are also used for email security policies like SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail), which help prevent spammers from faking emails from your domain.

SOA Record (Start of Authority)

  • What it is: This record provides administrative information about the DNS zone.
  • Why it matters: It contains the “serial number” for your DNS records. When this number changes, other servers know they need to fetch the new, updated information. It also includes the domain administrator’s email, refresh timers, and other technical details.

PTR Record (Pointer Record)

  • What it is: The opposite of an A record. It performs a reverse DNS lookup, pointing an IP address back to a hostname.
  • Why it matters: This is primarily used as an anti-spam measure. Mail servers will often check the PTR record of the sending IP to see if it matches the domain it claims to be.

Quick Reference: DNS Record Types

Record TypeFull NamePurpose
AAddressPoints a name to an IPv4 address.
AAAAQuad-APoints a name to an IPv6 address.
CNAMECanonical NameCreates an alias (name) pointing to another name.
MXMail ExchangeSpecifies the mail servers for the domain.
NSName ServerIdentifies the authoritative name servers for the domain.
TXTTextHolds text data for verification and email security (SPF, DKIM).
SOAStart of AuthorityContains administrative details about the DNS zone.
PTRPointerPoints an IP address back to a name (reverse DNS).

Getting Started with nslookup: Access and Syntax

One of the best things about nslookup is that it’s already on your computer. You do not need to install anything.

  • On Windows: You can open it from the Command Prompt (cmd.exe) or Windows PowerShell.
  • On macOS: You can find it in the Terminal app.
  • On Linux: It is available in any terminal emulator.

The Two Modes of nslookup

nslookup operates in two different modes.

  1. Non-Interactive Mode: This is what you use for a single, quick lookup. You type the full command, it gives you an answer, and you are done.
    • Example: nslookup elementor.com
  2. Interactive Mode: You use this for in-depth troubleshooting. You just type nslookup and hit Enter. This drops you into a special prompt (marked with a >) where you can run multiple queries, change your query type, and even ask different servers for answers.
    • Example: nslookup
    • >

Using nslookup: A Practical Guide (Non-Interactive Mode)

This is the fastest way to get answers. The syntax is simple: nslookup [options] [domain]

The Basic Lookup: Finding an A Record

This is the most common query. You just ask for a domain name.

Command:

nslookup elementor.com

Output:

Server:  192.168.1.1

Address: 192.168.1.1#53

Non-authoritative answer:

Name:    elementor.com

Address: 34.149.196.48

Name:    elementor.com

Address: 35.244.177.203

How to Read the Output

  • Server: and Address:: This is the DNS server (resolver) your computer used to get the answer. In this case, it’s my local router. The #53 means it used DNS port 53, which is standard.
  • Non-authoritative answer:: This is a very important line. It means the answer came from your resolver’s cache. It is not the official, authoritative answer from Elementor’s own name server. For 99% of troubleshooting, this is fine. It tells you what the public internet sees.
  • Name: and Address:: This is the answer you wanted. It shows that elementor.com has two A records, pointing to two different IP addresses for load balancing.

Finding the Name Servers (NS Records)

If you want to know “who is in charge” of a domain’s DNS, you ask for the NS records. We do this by specifying the record type with the -type= option.

Command:

nslookup -type=ns elementor.com

Output:

Server:  192.168.1.1

Address: 192.168.1.1#53

Non-authoritative answer:

elementor.com   nameserver = guy.ns.cloudflare.com.

elementor.com   nameserver = meera.ns.cloudflare.com.

This output tells us that elementor.com uses Cloudflare’s name servers. These two servers hold the “master” records.

Checking Mail Servers (MX Records)

Is your client’s contact form failing? Are your own transactional emails bouncing? The first step is to check the MX records.

Command:

nslookup -type=mx elementor.com

Output:

Server:  192.168.1.1

Address: 192.168.1.1#53

Non-authoritative answer:

elementor.com   mail exchanger = 10 aspmx.l.google.com.

elementor.com   mail exchanger = 20 alt1.aspmx.l.google.com.

elementor.com   mail exchanger = 20 alt2.aspmx.l.google.com.

This shows us two key things:

  1. mail exchanger =: The names of the mail servers. We can see elementor.com uses Google’s mail servers.
  2. 10, 20: These are the priority values. A server will always try to deliver to the lowest-numbered server first (in this case, aspmx.l.google.com at priority 10). If that server fails, it will move to the next-highest priority.

The Web Creator’s Use Case: Troubleshooting Email

As a web creator, you will get the “my contact forms are broken” ticket. Before you spend an hour debugging your WordPress setup, run this 2-second command. If the client’s MX records are missing or pointed to the wrong place, the problem has nothing to do with your site.

This check is a crucial first step. While many email issues are related to deliverability from the web server itself, checking the domain’s MX records is step one. Tools like Site Mailer by Elementor are designed to solve the other half of the equation. They route your website’s transactional emails through a trusted delivery service, bypassing many common server-side deliverability problems.

Checking TXT Records (SPF, Verification)

Need to verify a domain for Google Search Console? Or check if a domain has proper email security? You query the TXT records.

Command:

nslookup -type=txt google.com

Output:

google.com      text = “v=spf1 include:_spf.google.com ~all”

google.com      text = “google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0KnoHfYayX4Kjg”

In this output, we can clearly see Google’s SPF record (v=spf1…), which tells mail servers which IPs are allowed to send email as google.com. We also see a site verification string for their own tool.

Finding the Start of Authority (SOA Record)

This gives you the administrative details for the DNS zone.

Command:

nslookup -type=soa elementor.com

Output:

        origin = guy.ns.cloudflare.com

        mail addr = dns.cloudflare.com

        serial = 2335431686

        refresh = 10000

        retry = 2400

        expire = 604800

        minimum = 3600

The most important line here is serial. This is the version number of the DNS zone. When you make a DNS change, this number must increase. If it doesn’t, other servers won’t know to pick up your change.

Performing a Reverse DNS Lookup (PTR Record)

Instead of a name, let’s give nslookup an IP address. We’ll use one of Google’s public DNS servers, 8.8.8.8.

Command:

nslookup 8.8.8.8

Output:

8.8.8.8.in-addr.arpa      name = dns.google.

This tells us that the IP address 8.8.8.8 correctly identifies itself as dns.google.

Advanced Troubleshooting with Interactive Mode

For single queries, non-interactive mode is fast. But for real detective work, you need interactive mode. This mode lets you set options once and run many queries, saving you a ton of typing.

How to Enter Interactive Mode

Just type nslookup by itself and press Enter.

Command:

nslookup

Output:

>

This > is your new prompt. You are now inside the nslookup environment.

Changing the Query Type

Let’s say you need to check the MX, NS, and TXT records for a domain. Instead of typing -type=… every time, you can just set it as a variable.

Command:

> set type=mx

> elementor.com

(mx record output)

> set type=ns

> elementor.com

(ns record output)

This is much more efficient. You can set the type to any record (A, AAAA, MX, NS, TXT, SOA, ANY, etc.).

Querying a Specific DNS Server

This is the most powerful troubleshooting feature of nslookup.

By default, nslookup asks your local resolver (your ISP). But what if your ISP’s cache is old? Or what if you want to check what a different part of the world sees? You can tell nslookup to ask a specific server for the answer.

We do this with the server command.

> server 1.1.1.1

Default server: 1.1.1.1

Address: 1.1.1.1#53

> elementor.com

(output from Cloudflare’s 1.1.1.1 server)

> server 8.8.8.8

Default server: 8.8.8.8

Address: 8.8.8.8#53

> elementor.com

(output from Google’s 8.8.8.8 server)

The “My New Site Isn’t Live” Problem

As web developers, we’ve all been there. You just launched a client’s beautiful new site on a high-performance platform like Elementor Hosting. You’ve gone into the domain registrar, where they got their free domain name, and you’ve updated the A record to point to the new server’s IP.

You load the site, and it looks perfect. You email the client. They reply, “I don’t see it. It’s still the old site!”

This is DNS propagation, and it’s the source of endless frustration. It simply takes time for all the recursive resolvers around the world to clear their old, cached IP address and fetch the new one. This can take minutes or, in some cases, hours.

nslookup is your tool to prove what’s happening.

Here is your step-by-step troubleshooting plan:

Find the Authoritative Server:
> set type=ns yournewdomain.com

  1. (Let’s say it replies with ns1.yourhost.com)

Ask the Authoritative Server Directly: This server has the master copy. Its answer is the ultimate truth.
> server ns1.yourhost.com

> yournewdomain.com

  1. The IP address it returns should be your new server’s IP. If this is correct, you have done your job perfectly. The record is set at the source.

Check Public Resolvers: Now you check what the rest of the world sees.
> server 1.1.1.1

> yournewdomain.com

(See what Cloudflare’s cache says)
> server 8.8.8.8

> yournewdomain.com

  1. (See what Google’s cache says)

If the authoritative server shows the new IP, but Google and Cloudflare show the old IP, you have successfully diagnosed the problem. The DNS record is correct, and you are simply waiting for the public caches to update. You can confidently tell your client, “The change is made and is propagating. It should be visible for you soon.”

Enabling Debug Mode

If you really want to see what’s happening under the hood, you can enable debug mode.

Command:

> set debug

> elementor.com

This will return a massive, detailed packet-by-packet breakdown of the entire query. It shows you the query flags, the opcodes, the answer count, and more. This is generally more detail than a web creator needs, but it’s an incredibly powerful tool for network engineers.

Exiting Interactive Mode

When you are finished with your detective work, just type exit.

Command:

> exit

This will return you to your normal command prompt.

A Note from the Expert

As a web development expert, nslookup is one of the first tools I reach for when a site goes down or a new launch feels wobbly. As my colleague Itamar Haim, a fellow web expert, often says, “Before you blame the code, the CMS, or the hosting, you must verify the DNS. nslookup is the fastest way to get that ground truth.” This simple command has saved me countless hours of needless troubleshooting by pointing me to the real source of the problem right away.

Common nslookup Error Messages (And What They Mean)

Sometimes, nslookup gives you an error. Here is what the most common ones mean.

** server can’t find yourdomain.com: NXDOMAIN

  • What it means: “Non-Existent Domain.” This is a definitive answer from the DNS server. The domain you typed does not exist.
  • What to do: Check your spelling. You almost certainly have a typo.

** server can’t find yourdomain.com: SERVFAIL

  • What it means: “Server Failure.” The DNS resolver you queried tried to get an answer but failed. This usually means the domain’s authoritative name servers are down, misconfigured, or failing to respond.
  • What to do: This indicates a serious problem with the domain’s configuration.

DNS request timed out.

  • What it means: The DNS server you sent the query to (listed as Server:) never responded at all.
  • What to do: Your computer might be offline. Or, the specific DNS server you are using is down. Try querying a public one, like server 1.1.1.1.

** server can’t find yourdomain.com: No answer

  • What it means: This is subtle. The server was contacted, but it has no records of the type you requested.
  • What to do: For example, you may have run nslookup -type=mx yourdomain.com for a domain that has no MX records set up. The domain exists (so it’s not NXDOMAIN), but it has no mail servers.

nslookup vs. The Modern Alternatives (dig and host)

If you spend time on web development forums, you will quickly hear people say “don’t use nslookup, use dig.” Let’s clarify this.

  • dig (Domain Information Groper): This is the modern standard on macOS and Linux. It provides a much more detailed, cleaner, and more readable output than nslookup. It is the preferred tool for network admins. Its main drawback is that it is not installed on Windows by default.
  • host: This is another simple, fast tool on macOS and Linux. It gives very clean, simple answers and is great for scripting. It is also not on Windows by default.

The Verdict: Why We Still Teach nslookup

Why did this entire guide focus on nslookup? Because it is the only tool that is guaranteed to be on every major operating system you and your clients will use.

A developer on a Mac can give instructions to a client on a Windows machine, and the nslookup command will work identically for both of them. It is the true universal language for basic DNS checks. While dig is arguably more powerful, nslookup is the one tool you can always rely on, everywhere.

Practical Scenarios for Web Creators

Let’s put this all together in a few common-day scenarios.

Scenario 1: Launching a New eCommerce Hosting Site

  • Problem: You built a new WooCommerce store on an eCommerce Hosting plan. You changed the A record. How do you know when it’s live?
  • Solution:
    1. Enter nslookup for interactive mode.
    2. set type=ns yournewstore.com (Find the authoritative name servers).
    3. server ns1.authoritativeserver.com (Query the master server directly).
    4. yournewstore.com (Check the A record. If this IP is your new server, you are 100% correct).
    5. server 1.1.1.1 (Check Cloudflare’s cache).
    6. server 8.8.8.8 (Check Google’s cache).
    7. Now you have a complete picture of propagation.

Scenario 2: Client “Email Not Working”

  • Problem: A client insists their contact forms are failing and blames your WordPress site.
  • Solution:
    1. nslookup -type=mx clientdomain.com
    2. Analyze the output. Does it show the correct mail servers for their provider (e.g., Google, Microsoft 365, internal server)?
    3. If there are no MX records (No answer) or they are wrong, you have found the problem. It is not your website. It is a misconfiguration of their domain’s mail records.

Scenario 3: Verifying a Domain for a Third-Party Service

  • Problem: You need to add a TXT record to verify Google Search Console, but Google says it “can’t find” it.
  • Solution:
    1. nslookup -type=txt clientdomain.com
    2. Look at the output. Do you see your google-site-verification=… string?
    3. If not, you know the record hasn’t been added or hasn’t saved.
    4. If you do see it, but Google doesn’t, you are likely just waiting for propagation.

Visual Guide: Using nslookup

Reading about commands is one thing, but seeing them in action can make it all click. This video provides a great visual walkthrough of the nslookup command and its basic functions.

Conclusion: The Unsung Hero of Your Toolkit

The nslookup command isn’t fancy. It’s not a visual builder, and it won’t design a beautiful hero section. But it is one of the most critical diagnostic tools in your entire web creation toolkit.

It empowers you to look “under the hood” of the internet and get definitive answers. It stops the guesswork. It lets you find the real reason a site is down or an email is missing. Mastering this simple command is one of the key things that separates an amateur from a professional, allowing you to confidently troubleshoot and manage any website project, from a simple blog to a complex build on the Elementor platform.

Frequently Asked Questions (FAQ) About nslookup

1. What does nslookup stand for? nslookup stands for “Name Server Lookup.”

2. Is nslookup deprecated? Should I use dig instead? nslookup is technically deprecated on UNIX-like systems (macOS, Linux) in favor of dig and host. However, it is not deprecated on Windows and is included in all major operating systems by default. Because of its universal availability, it remains an essential tool. dig is more powerful but is not available on Windows without a separate installation.

3. What is a “non-authoritative answer” in nslookup? This means the answer came from a cache. Your DNS resolver (like your ISP’s) is giving you an answer it already had on file. It is not the official answer from the domain’s authoritative name server. This is normal and fast. An “authoritative answer” comes directly from the master server for that domain.

4. How can I use nslookup to check my email’s SPF record? An SPF record is just a specific type of TXT record. You can check it with the command: nslookup -type=txt yourdomain.com. Look for the line that starts with “v=spf1…”.

5. Why does nslookup show a different IP address than what I see in my browser? This is almost always due to caching. Your computer, your browser, and your router all have their own DNS caches. nslookup queries the DNS resolver directly. Your browser might be holding on to an older, cached record. This is why clearing your browser cache or flushing your OS’s DNS cache is a common troubleshooting step.

6. How do I find my own DNS server with nslookup? Just run the basic nslookup yourdomain.com command. The first two lines of the output will show you. The Server: and Address: fields show the name and IP of the DNS resolver your computer is configured to use.

7. What does NXDOMAIN mean? NXDOMAIN stands for “Non-Existent Domain.” It is a definitive, official answer from the DNS system that the domain name you queried does not exist. Check for typos.

8. Can nslookup show me all subdomains for a domain? No. This is a common misconception. A request to see all records for a domain is called a “zone transfer” (AXFR). For security reasons, 99.9% of DNS servers are configured to block public zone transfers. You can only look up subdomains if you already know their exact names (e.g., nslookup blog.yourdomain.com).

9. Why would I query a different name server? The most common reason is to check DNS propagation. When you make a DNS change (like pointing an A record to a new host), you can query the domain’s authoritative name server to see the new record instantly. Then you can query public resolvers (like 1.1.1.1 or 8.8.8.8) to see if they have picked up the change yet.

10. How is nslookup useful for me as a WordPress developer? It’s a primary troubleshooting tool.

  • Site Launch: Verify your new A record is live and propagating.
  • Email: Check if the client’s MX records are set up correctly before you debug your contact form plugin.
  • Third-Party Tools: Confirm that the TXT or CNAME records you added for a service (like Google Search Console or a CDN) are correct.