Whether you are trying to resolve a frustrating "DNS_PROBE_FINISHED_NXDOMAIN" browser error, migrating a website to a new hosting provider, or securing your network against privacy leaks, you will eventually need to find DNS information.
The challenge is that "finding DNS" means different things depending on your specific goal. Broadly, internet users and IT professionals alike find themselves looking for one of two distinct categories:
- Your Active DNS Server IP Address: The IP address of the local recursive resolver (usually provided by your Internet Service Provider or custom public DNS) that your computer, phone, or router contacts to translate hostnames into machine-readable IP addresses.
- A Domain's DNS Records: The official resource records (such as A, CNAME, MX, TXT, and NS records) belonging to a specific website domain, which dictate where web traffic, email, and security settings are directed.
In this comprehensive guide, we will cover both use cases. You will learn how to find your local device's active DNS IP address on Windows, macOS, Linux, iOS, and Android, as well as how to perform advanced domain lookups, reverse DNS lookups, and trace all IP addresses mapped to a domain using built-in command-line utilities and online tools.
1. How to Find Your Active DNS Server IP Address on Any Device
When you type a domain name into your browser, your operating system relies on a DNS server (also called a recursive resolver) to locate the target website. If you are experiencing connectivity drops or want to switch to a faster, privacy-oriented public DNS provider, your first step is to check your current DNS configuration. Here is how to find this information on every major platform.
How to Find Your DNS IP Address on Windows
Windows provides several methods to check your active network settings, ranging from quick terminal commands to graphical interfaces.
Method A: Command Prompt (The Quickest Way)
Using the classic ipconfig tool is the most reliable way to find all network details simultaneously:
- Press the Windows Key, type
cmd, and press Enter to launch the Command Prompt. - Type the following command and press Enter:
ipconfig /all - Scroll through the output to find your active network adapter (usually labeled "Ethernet adapter Ethernet" or "Wireless LAN adapter Wi-Fi").
- Look for the line labeled DNS Servers. You will see one or more IP addresses listed (for example,
192.168.1.1or public addresses like8.8.8.8).
Method B: PowerShell (Cleanest Output)
If you prefer a cleaner, command-only interface that cuts out the clutter of ipconfig /all, PowerShell is the perfect tool:
- Right-click the Start menu button and select Terminal or PowerShell.
- Run this command:
Get-DnsClientServerAddress - PowerShell will display a table showing your active interface index, the interface alias (Wi-Fi or Ethernet), and the exact IPv4 and IPv6 DNS addresses assigned to them.
Method C: Windows System Settings (No Commands Needed)
If you prefer navigating with your mouse:
- Open Settings (press
Win + I). - Go to Network & internet on the left menu.
- Click on your active connection type (Wi-Fi or Ethernet) at the top.
- Click on Hardware properties (or click details on your connected network).
- Scroll down to find the IPv4 DNS servers and IPv6 DNS servers fields.
How to Find Your DNS IP Address on macOS
Mac users can easily query their active DNS servers through either the Terminal or the macOS System Settings.
Method A: The macOS Terminal
- Open Spotlight Search by pressing
Cmd + Space, typeTerminal, and press Enter. - Run the following command to print your active network configuration:
scutil --dns - The terminal will output several configuration blocks. Look at "resolver #1" near the top of the output. The line labeled
nameserver[0]will display your primary DNS IP address. - Alternatively, if you want a cleaner response for a specific network interface, use the
networksetuputility:networksetup -getdnsservers Wi-Fi(Note: Replace "Wi-Fi" with "Ethernet" if you are using a wired connection.)
Method B: System Settings
- Click the Apple Menu in the top-left corner of your screen and select System Settings.
- Click Network in the left sidebar.
- Click on your active connection (e.g., Wi-Fi or Ethernet), then click the Details... button next to your connected network.
- Select the DNS tab from the left column of the pop-up window.
- Under the DNS Servers box, you will see the active IP addresses assigned to your device.
How to Find Your DNS IP Address on Linux
Linux distributions manage networking in various ways, but a few universal commands can quickly retrieve your active DNS settings.
Method A: Inspecting the resolv.conf File
Traditionally, Linux systems write their active DNS resolvers to the /etc/resolv.conf file. You can read this file directly:
cat /etc/resolv.conf
You will see lines starting with nameserver, followed by an IP address.
Important Note for Modern Linux Distributions: Many modern distros (like Ubuntu, Debian, Fedora) use systemd-resolved to manage DNS. If you see nameserver 127.0.0.53 or nameserver 127.0.0.1 in your resolv.conf file, this is a local loopback address (stub resolver) acting as a middleman. To find the actual upstream DNS IP address your system is using, run this command:
resolvectl status or systemd-resolve --status
Look for the Current DNS Server entry under your active network interface.
Method B: Using NetworkManager CLI (nmcli)
If your distribution utilizes NetworkManager (common in CentOS, RHEL, and Ubuntu Desktop):
nmcli dev show | grep IP4.DNS
This command instantly filters out everything else and returns only the active IPv4 DNS server addresses.
How to Find Your DNS IP Address on Mobile Devices (iOS & Android)
If you are troubleshooting issues on a smartphone or tablet, finding your DNS server is simple.
On iOS (iPhone & iPad):
- Open the Settings app and tap Wi-Fi.
- Tap the blue "i" (information) icon next to your currently connected network.
- Scroll down to the DNS section and look at Configure DNS.
- By default, it will say "Automatic," and the active DNS IP addresses will be displayed directly below it.
On Android:
(Note: Android settings menus vary slightly by manufacturer, but the general pathway is highly consistent.)
- Open the Settings app and navigate to Network & Internet > Internet (or Wi-Fi).
- Tap the gear icon next to your active network connection.
- Tap Advanced or scroll down to view the network details.
- Your active DNS server IP addresses will be listed in the details panel. If your phone is using Private DNS, that setting will be highlighted separately at the bottom of your network preferences screen.
Understanding the Router Gateway Loop
When inspecting your device's network configuration, you might notice that the listed DNS IP address matches your home router's default gateway IP (for example, 192.168.1.1 or 10.0.0.1).
This does not mean your router is performing the final DNS translations. Instead, your router acts as a DNS forwarder or local proxy. It receives the query from your device and forwards it to your Internet Service Provider's (ISP) authoritative servers or a public service like OpenDNS.
To find the actual upstream DNS servers your network is utilizing:
- Log into your router's administrative dashboard by typing your gateway IP address into a web browser.
- Navigate to the WAN Settings, Status Page, or Internet Settings.
- Locate the DNS Addresses dynamically assigned to your router by your ISP's DHCP server.
2. How to Find DNS Records for Any Domain
Now let's switch gears to the second common search intent: looking up the public DNS records of a specific website or domain name. If you are launching a website, managing professional email addresses, or diagnosing hosting issues, you need to query public nameservers to verify your entries.
The Anatomy of DNS Records: What Are You Looking For?
Before executing lookup commands, it is helpful to understand the primary record types you will encounter:
- A Records: The foundational IPv4 records that map a domain name to a physical web server IP address.
- AAAA Records: The IPv6 equivalent of the standard A record.
- CNAME Records: Canonical Name records, which act as aliases pointing a subdomain (like
www.example.com) to another domain (likeexample.com). - MX Records: Mail Exchanger records that dictate which mail servers handle inbound emails for the domain.
- TXT Records: Text records used to hold administrative notes, domain verification codes, and email authentication policies (such as SPF, DKIM, and DMARC).
- NS Records: Name Server records that define which servers are authoritative for managing the DNS settings of your domain.
Querying DNS Records with Command-Line Tools
You do not need to download custom software to inspect domain settings. Your operating system comes equipped with robust tools designed for this exact task.
1. Using nslookup (Cross-Platform)
The nslookup (Name Server Lookup) command is built into Windows, macOS, and Linux, making it the most universally accessible diagnostic tool.
To perform a basic A-record lookup:
Simply type the command followed by the target domain:
nslookup example.com
The output will show the name of your local DNS resolver, its IP address, and a section titled "Non-authoritative answer" containing the IPv4 (and sometimes IPv6) addresses mapped to that domain.
To search for specific DNS record types:
You can refine your search by appending the -type flag. For example:
- To find MX (Mail) records:
nslookup -type=mx example.com - To find TXT records:
nslookup -type=txt example.com - To find CNAME records:
nslookup -type=cname sub.example.com
Using Interactive Mode:
If you need to perform multiple lookups sequentially, run nslookup without any arguments to launch its interactive shell. From there, you can run commands like:
> set type=any
> example.com
This will retrieve all available public records for the domain in a single pass. Type exit to return to your normal terminal.
2. Using dig (The Industry Standard for macOS & Linux)
While nslookup is quick and versatile, system administrators and developers almost universally prefer dig (Domain Information Groper). It is faster, formats its output in a layout matching the actual zone files, and provides much more detailed header information.
dig is native to macOS and Linux. Windows users can install it as part of the BIND tools package or via the Windows Subsystem for Linux (WSL).
Basic Domain Lookup:
dig example.com
By default, this command searches for the main A record. The output contains several sections:
- QUESTION SECTION: Confirms the domain and record type you queried.
- ANSWER SECTION: Displays the target IP address, record type, and the TTL (Time to Live) value, which tells you how many seconds a resolver will cache this record before checking for updates.
Querying Specific Record Types:
With dig, you do not need flags; simply append the record type to the end of your command:
dig example.com MX(Finds mail servers)dig example.com TXT(Finds text settings like SPF/DMARC)dig example.com CNAME(Finds aliases)dig example.com ANY(Attempts to fetch all records in the zone)
Advanced dig Tricks for Professionals:
- Get clean, raw IP outputs only: If you are writing a script and only want the target IP address without the headers, append the
+shortoption:dig example.com +short - Query a specific nameserver directly: Sometimes local caching prevents you from seeing newly updated records. You can bypass your local network's DNS cache entirely by instructing
digto query an external DNS server directly (such as Google's8.8.8.8) using the@symbol:dig @8.8.8.8 example.com MX - Trace the full resolution path: Want to see the hierarchical query path from the global Root Servers to the Top-Level Domain (TLD) servers and down to the domain's authoritative host? Run a DNS trace:
dig example.com +trace
Using Web-Based Online DNS Lookups
If you are working on a machine where you do not have command line access, or if you prefer a graphical interface, there are several outstanding, free web tools to find DNS information globally:
- MXToolbox: Widely regarded as the gold standard for checking MX, TXT, SPF, and general domain health. It performs recursive testing and highlights configuration errors.
- Google Admin Toolbox (Dig): A clean web implementation of the classic command-line
digutility, querying Google's high-speed public DNS infrastructure directly. - DNSChecker.org: Extremely helpful when you have recently updated your domain's records. DNSChecker queries servers across dozens of geographical locations globally, allowing you to monitor the physical propagation of your updates in real-time.
3. How to Find DNS Records for an IP Address (Reverse DNS)
Most internet lookups translate a human-readable domain name into a numeric IP address. However, cybersecurity analysts, network engineers, and email servers often need to do the exact opposite: find dns records for ip addresses. This process is known as a Reverse DNS (rDNS) Lookup.
The Role of the PTR (Pointer) Record
To perform a reverse lookup, your query looks for a specific record type called a PTR (Pointer) Record.
Unlike standard forward records (which map names to IPs), PTR records map a physical IP address back to its associated domain name. These records are stored in a specialized, reversed domain zone ending in .in-addr.arpa (for IPv4) or .ip6.arpa (for IPv6).
For example, if you run a reverse lookup on the IP 8.8.8.8, the query actually looks up 8.8.8.8.in-addr.arpa, which points back to its hostname: dns.google.
Running Reverse Lookups in the Command Line
You can easily find the primary hostname associated with any IP address using either dig or nslookup.
Using dig for Reverse Lookups
To query a reverse DNS entry on macOS or Linux, append the -x flag followed by the IP:
dig -x 8.8.8.8
In the ANSWER SECTION, you will see the resolved pointer name:
8.8.8.8.in-addr.arpa. 300 IN PTR dns.google.
Using nslookup for Reverse Lookups
On Windows, simply pass the IP address directly into nslookup without any flags:
nslookup 8.8.8.8
The tool will detect that you entered an IP address instead of a domain name and automatically perform a reverse lookup, returning the hostname:
Name: dns.google
The Reality of Finding "All" DNS Records for an IP
A common question arises when administrators try to find all dns records for an ip.
It is vital to understand a core limitation of the Domain Name System: DNS is designed to map many domains to a single IP address, but an IP address typically only has one PTR record.
On a shared web hosting server, a single IP address might host hundreds of independent websites. While each of those websites has a unique forward A record pointing to that shared IP, the physical IP address itself will only have a single PTR record pointing to the hosting company's primary server name (e.g., server104.hostingprovider.com).
Because there is no official protocol within DNS to query an IP and receive a list of every domain pointing to it, you cannot retrieve this list using standard tools like dig or nslookup.
To bypass this limitation and find all hostnames associated with a specific IP, you must use a Reverse IP Lookup tool (such as those offered by HackerTarget, ViewDNS, or MXToolbox). These services use massive, passive DNS databases that monitor and index historical DNS queries from across the web. By searching their archives, they can compile a comprehensive list of every domain name currently or historically observed pointing to that specific IP.
4. How to Find All IP Addresses for a DNS Name
On the flip side, what happens if you want to find all ip addresses for a dns name?
For small websites, a domain will resolve to a single IPv4 address and perhaps one IPv6 address. However, massive enterprises, content delivery networks (CDNs), and cloud providers (like Google, Amazon, Cloudflare, or Netflix) use advanced infrastructure to route user traffic. To ensure high availability and minimize latency, they map their domains to dozens of active IP addresses across global data centers.
Methods to Find Every Resolved IP Address
To find every IP address assigned to a domain name, you can utilize standard lookup tools:
Option 1: Using nslookup
When you query a highly-redundant domain, nslookup lists every active IP mapping in its response:
nslookup google.com
Under the Addresses section, you will see a list of multiple IPv4 and IPv6 addresses. Each time you run the command, the order of the IPs may rotate (a load-balancing technique known as Round Robin DNS).
Option 2: Using dig (To Extract IPv4 and IPv6)
By default, standard queries to dig return the primary A records (IPv4). To inspect both standard IP versions, you should explicitly query both A and AAAA records:
- To find all IPv4 addresses:
dig google.com A - To find all IPv6 addresses:
dig google.com AAAA
Option 3: Handling CDNs and Anycast IP Ranges
If a website is behind a provider like Cloudflare, AWS CloudFront, or Fastly, you are not seeing the physical IP of their origin web server. Instead, you are finding the IP addresses of the CDN's edge proxies.
Because these CDNs utilize Anycast routing, the IP addresses you find when querying from New York will be entirely different from the IP addresses a user in Tokyo resolves for the exact same domain name. In these modern setups, a domain does not have a static list of physical IPs; it is dynamically resolved based on the closest physical edge node to the client making the request.
5. Troubleshooting and Optimizing Your DNS Settings
Now that you know how to find local DNS IPs and search domain records, you might run into situations where your findings do not match your expectations. For example, you may have just updated a DNS record in your domain registrar, but your browser is still loading the old server. Here is how to handle these common issues.
How to Flush Your DNS Cache
Your operating system and browser cache DNS lookups locally to speed up web browsing. If you make a DNS change, you must force your system to clear its memory so it performs a fresh query to find the updated records.
Windows:
- Open the Command Prompt as an Administrator.
- Run this command:
ipconfig /flushdns - You will see a success message: "Successfully flushed the DNS Resolver Cache."
macOS:
- Open the Terminal.
- Run the following command:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your administrator password to authorize the change.
Linux (systemd-resolved systems):
- Open the Terminal.
- Run the following command:
sudo resolvectl flush-cachesorsudo systemd-resolve --flush-caches
Switching to Faster, Safer Public DNS Resolvers
If you discover that your local DNS server IP is your ISP's default router gateway, you might want to switch to a trusted, high-performance public DNS provider. Default ISP DNS servers are often slow, prone to outages, and can track your browsing history to serve targeted advertisements.
By manually changing your device or router settings to one of the following providers, you can significantly improve your browsing speed, security, and privacy:
| Provider | Primary IPv4 | Secondary IPv4 | Primary IPv6 | Key Benefit |
|---|---|---|---|---|
| Cloudflare | 1.1.1.1 |
1.0.0.1 |
2606:4700:4700::1111 |
Fastest performance & privacy |
| Google Public DNS | 8.8.8.8 |
8.8.4.4 |
2001:4860:4860::8888 |
High reliability & global reach |
| Quad9 | 9.9.9.9 |
149.112.112.112 |
2620:fe::fe |
Built-in malware & threat blocking |
6. Frequently Asked Questions
How do I find my DNS name?
To find my dns name on a local computer, you are looking for your local hostname or Fully Qualified Domain Name (FQDN) assigned to your machine within your local network.
- On Windows, open the Command Prompt and type
hostname. To see your full DNS suffix, typeipconfig /alland look for the "Primary Dns Suffix" or "Host Name" line. - On macOS or Linux, open the Terminal and type
hostnameto find your machine's name, orhostname -fto see its fully qualified domain name.
Can I find all DNS records for an IP?
No, you cannot query standard DNS servers to find a complete list of every active domain record mapped to an IP address. DNS is designed to translate names to IPs (forward lookup), while reverse lookups (PTR) only map an IP address to a single primary canonical name. To find all domain records pointing to a specific IP, you must use a third-party reverse IP lookup database (like HackerTarget or ViewDNS) that aggregates passive DNS traffic data.
How do I find my DNS records if I forgot my registrar?
If you own a domain but forgot which company is hosting your DNS settings, run a simple NS (Name Server) lookup:
nslookup -type=ns yourdomain.com or dig yourdomain.com NS
The nameservers listed in the output (e.g., ns1.cloudflare.com or dns1.registrar-servers.com) will tell you which provider currently hosts and manages your domain's DNS zone files.
What is a DNS leak, and how do I find if I have one?
A DNS leak occurs when you are connected to a Virtual Private Network (VPN) to secure your web traffic, but your system continues sending DNS queries to your local ISP's resolvers instead of the secure, encrypted VPN tunnel. To check for leaks, connect to your VPN and visit an online tool like dnsleaktest.com. If the test displays your physical ISP's name or your actual location instead of your VPN provider's servers, you have a DNS leak that requires troubleshooting.
Conclusion
Finding DNS information does not have to be a complicated task. By separating the process into local client settings (finding the IP address of the server translating requests for your device) and public domain lookups (finding the structural records that point web resources in the right direction), you can quickly find the exact data you need.
Utilizing native tools like ipconfig, scutil, and resolvectl ensures you always know how your own system connects to the network. Meanwhile, mastering CLI commands like dig and nslookup provides you with the power to troubleshoot website migrations, trace reverse IPs, verify mail records, and optimize your overall internet performance with absolute confidence. Keep this guide bookmarked for the next time you need to diagnose or inspect your internet infrastructure.






