My DNS Troubleshooting Workflow
The systematic approach I use to diagnose connectivity problems - separating network issues from DNS issues in minutes.
Half the "network is down" tickets I've seen were actually DNS problems. The other half were misconfigured firewalls. Here's how I quickly figure out which is which.
Step 1: Ping an IP Address
ping 8.8.8.8
This bypasses DNS entirely. If this works, your network is fine - the problem is name resolution. If this fails, don't waste time on DNS yet.
No response? Check:
- Is your WiFi/Ethernet connected?
- Can you ping your gateway? (
ping 192.168.1.1) - Is there a firewall blocking outbound traffic?
Step 2: Ping a Hostname
ping google.com
IP works, hostname fails = DNS problem. Continue with DNS troubleshooting.
Both work = intermittent issue or specific to one site. Try the specific domain that's failing.
Step 3: Check Your DNS Servers
Linux:
cat /etc/resolv.conf
# or for systemd-resolved
resolvectl status
macOS:
networksetup -getdnsservers Wi-Fi
Windows:
ipconfig /all
Look at which DNS servers are configured. Are they reachable? Sometimes DHCP assigns a broken or slow DNS server.
Step 4: Test with a Known-Good DNS
nslookup google.com 8.8.8.8
This queries Google's DNS directly. If this works but your configured DNS doesn't, you've found the problem.
Linux/macOS with dig:
dig @8.8.8.8 google.com
I prefer dig - it shows more detail including TTLs and record types.
Step 5: Flush DNS Cache
Stale cache causes weird issues. A domain moved IPs but your machine still has the old one cached.
Windows:
ipconfig /flushdns
macOS:
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
Linux (systemd):
sudo systemd-resolve --flush-caches
Switching to Public DNS
If your ISP's DNS is the problem, switch to public resolvers:
Cloudflare: 1.1.1.1, 1.0.0.1 Google: 8.8.8.8, 8.8.4.4 Quad9: 9.9.9.9
Linux quick fix:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
Note: NetworkManager or systemd-resolved might overwrite this. For permanent changes, configure through your network manager.
Windows: Control Panel โ Network โ Adapter Properties โ IPv4 โ Use the following DNS server addresses
When It's Not DNS
If DNS lookups work but the site still doesn't load:
Check if it's blocked:
curl -I https://example.com
Check the route:
traceroute example.com # Linux/macOS
tracert example.com # Windows
Check if the service is running:
nc -zv example.com 443
Common Patterns I've Seen
"Internet is slow" - Often DNS. Slow resolver = delay before every connection starts.
"Only some sites work" - Either DNS (try different resolver) or routing/firewall.
"Worked yesterday, broken today" - DNS cache with expired record, or the site changed IPs and propagation hasn't reached you.
"WiFi works, Ethernet doesn't" - Different DHCP servers assigning different DNS. Check configs on both.
Key Takeaways
- Always ping IP (8.8.8.8) first - this separates network from DNS issues
- Use
nslookupordigto test specific DNS servers - Public DNS (1.1.1.1, 8.8.8.8) is reliable fallback for testing
- Flush DNS cache when domains recently changed
- Slow internet is often slow DNS - try a faster resolver
Written by Bar Tsveker
Senior CloudOps Engineer specializing in AWS, Terraform, and infrastructure automation.
Thanks for reading! Have questions or feedback?