How to Test DNS Resolution
Learn how to test DNS resolution with nslookup, ping, and public DNS servers.
Need Help?
Try our AI Troubleshooting Assistant for personalized help.

On This Page
Related Troubleshooting Guides
What Is DNS Resolution?
DNS (Domain Name System) resolution is the process of translating a website name, such as google.com, into an IP address that computers use to communicate.
For example:
google.com -> 142.250.190.14
If DNS resolution fails, websites may not load even when your internet connection is working.
Example
Use this section as your baseline before working through the symptoms, commands, and fixes below.
Symptoms of DNS Issues
Common symptoms include:
Websites will not load
"DNS Server Not Responding" errors
"Server Not Found" messages
Some websites work while others do not
Slow website loading times
Method 1: Test DNS with nslookup
Open Terminal or Command Prompt and run:
nslookup google.com
Successful result:
Server: 192.168.0.1 Address: 192.168.0.1#53 Non-authoritative answer: Name: google.com Address: 142.250.190.14
This confirms DNS is resolving the domain name correctly.
Failed result:
DNS request timed out. timeout was 2 seconds.
Another failed result may look like this:
*** Can't find google.com: Server failed
This indicates a DNS problem.
Method 2: Test with Ping
Run:
ping google.com
Successful result:
Pinging google.com [142.250.190.14] with 32 bytes of data: Reply from 142.250.190.14
Notice that the hostname was converted into an IP address.
Failed result:
Ping request could not find host google.com.
This usually means DNS resolution is failing.
Method 3: Compare DNS Servers
Test using a public DNS server.
Google DNS:
nslookup google.com 8.8.8.8
Cloudflare DNS:
nslookup google.com 1.1.1.1
If these work but your router's DNS server does not, the issue is likely with your ISP or local DNS server.
Method 4: Check Current DNS Servers
Windows:
ipconfig /all
Look for DNS server entries like:
DNS Servers . . . . . . . . . : 8.8.8.8
1.1.1.1macOS:
scutil --dns
Alternative macOS command:
networksetup -getdnsservers Wi-Fi
Linux:
cat /etc/resolv.conf
Troubleshooting DNS Problems
Flush DNS Cache:
Windows:
ipconfig /flushdns
macOS:
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
Change DNS Servers:
Try switching to:
Cloudflare: 1.1.1.1 and 1.0.0.1
Google DNS: 8.8.8.8 and 8.8.4.4
Restart Network Equipment:
Power off the modem and router
Wait 30 seconds
Power them back on
Test DNS again
Quick DNS Troubleshooting Checklist
Key Takeaway
If nslookup successfully returns an IP address, DNS resolution is working correctly. If it fails, focus on your DNS server settings, router configuration, or ISP DNS service.