How to Find the IP Address of a Domain Using the NSLookup Command in Windows 11

Whether you’re troubleshooting network issues, verifying DNS configuration, or checking where a website is hosted, the NSLookup command is one of the simplest and most reliable ways to find a domain’s IP address. Windows 11 includes NSLookup by default, so you can quickly query DNS servers without installing any extra tools.

In this guide, we’ll show you how to use the NSLookup command to find the IP address of any domain on Windows 11, along with additional examples and advanced lookup options.

1. Open Command Prompt on Windows 11

To run NSLookup, you need to open Command Prompt.

  1. Press Windows + S and type cmd.
  2. Click Command Prompt from the search results.
  3. If needed, right-click it and select Run as administrator.

You’re now ready to perform DNS lookups.

2. Use a Basic NSLookup Command to Find a Domain’s IP Address

A simple NSLookup command immediately returns the IP address linked to a domain.

Command:

nslookup domainname.com

Example:

nslookup google.com

Output includes:

  • DNS Server used
  • Primary IP address of the domain
  • Additional addresses (if multiple servers exist)

This is the most common way to get the IPv4 or IPv6 address of a website.

3. Use NSLookup to Query a Specific DNS Server

You can also choose which DNS server should answer your query. This helps identify DNS issues or compare results.

Command:

nslookup domainname.com DNS_Server

Example using Google DNS:

nslookup example.com 8.8.8.8

Example using Cloudflare DNS:

nslookup example.com 1.1.1.1

This helps you verify if different DNS servers resolve the same IP address.

4. Perform an NSLookup to Retrieve All Associated IP Addresses

Some domains have multiple A or AAAA records for load balancing. NSLookup will list all available IPs by default.

Example:

nslookup youtube.com

You may see several IPs assigned to the domain.

5. Get Only IPv4 or Only IPv6 Addresses

If you want to filter results, use the following commands:

Only IPv4 (A records):

nslookup -type=A domainname.com

Only IPv6 (AAAA records):

nslookup -type=AAAA domainname.com

This is useful when testing compatibility or troubleshooting network routing.

6. Check DNS Records of a Domain (MX, TXT, CNAME, NS)

NSLookup is not just for IPs — you can also query other DNS records.

MX (Mail server records):

nslookup -type=MX domainname.com

TXT (verification/SPF records):

nslookup -type=TXT domainname.com

CNAME (alias records):

nslookup -type=CNAME sub.domain.com

NS (authoritative name servers):

nslookup -type=NS domainname.com

These records are useful for domain configuration, email setup, or server management.

7. Use Interactive Mode for Multiple Queries

NSLookup has an interactive mode that allows repeated lookups without relaunching the command.

  1. Type: nslookup
  2. Once inside, enter domains directly: example.com google.com facebook.com
  3. To change DNS record type within interactive mode: set type=A set type=MX set type=AAAA
  4. To exit, type: exit

This mode is great for bulk queries or network diagnostics.

8. Verify if a Domain Is Pointing to the Correct Server

NSLookup can also be used to check if site migration or DNS propagation is complete.

Example:

nslookup yourwebsite.com 8.8.8.8

Compare it with:

nslookup yourwebsite.com 1.1.1.1

If both return the same IP, DNS propagation is complete.

9. Check the Reverse Lookup (Find Domain from an IP Address)

You can also use NSLookup to find the domain associated with an IP.

Command:

nslookup 142.251.36.46

This is helpful for server identification, logging, or troubleshooting.

Wrapping Up

Using NSLookup on Windows 11 is one of the easiest ways to find a website’s IP address, verify DNS settings, perform troubleshooting, or inspect domain records. Whether you need a simple lookup or an advanced record query, NSLookup provides quick and reliable results directly from the Command Prompt.

Once you get familiar with these commands, you’ll be able to diagnose DNS issues and analyze domain configurations much more efficiently.

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.

X