DNS Not Resolving: How to Fix DNS Issues on Windows and Mac

DNS not resolving means your computer can't translate domain names into IP addresses — the first step in every web connection. The fix is almost always flushing DNS cache, switching DNS servers, or restarting the router. Updated 2026-05-18.

Step 1: Flush DNS cache

On Windows: open Command Prompt as administrator and run ipconfig /flushdns. On Mac: open Terminal and run sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder. Flushing the cache removes stale or corrupted DNS entries that cause resolution failures for specific domains even when the DNS server itself is reachable.

Step 2: Test whether the problem is DNS or internet

Open Command Prompt or Terminal and run: ping 8.8.8.8. If the ping succeeds (you see reply times) but websites won't load in a browser, DNS is definitively the problem — your internet connection works but name resolution is failing. If ping also fails, the issue is connectivity, not DNS.

Step 3: Change DNS to 1.1.1.1 or 8.8.8.8

On Windows: open Network and Sharing Center > Change adapter settings > right-click your connection > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties > set Preferred DNS to 1.1.1.1 and Alternate DNS to 8.8.8.8. On Mac: System Settings > Network > your connection > Details > DNS > add 1.1.1.1 and 8.8.8.8. This bypasses your ISP's DNS servers, which are sometimes slow or temporarily failing.

Step 4: Restart the router

Your router caches DNS responses and acts as a DNS forwarder for your network. If the ISP's DNS servers have failed and the router is holding stale entries, a reboot forces it to request fresh DNS server assignments. Unplug the router for 30 seconds, plug back in, and wait for it to fully reconnect before retesting.

Step 5: Disable VPN

VPN software redirects DNS queries through the VPN tunnel. If the VPN's DNS servers are slow, overloaded, or unreachable, all domain resolution fails even though the physical internet connection is fine. Disconnect the VPN completely and test DNS resolution — if it works immediately, the VPN's DNS configuration is the problem.

Step 6: Check hosts file for conflicts

The hosts file overrides DNS for specific domains and is a common malware target. On Windows it is located at C:\Windows\System32\drivers\etc\hosts. On Mac it is at /etc/hosts. Open the file in a text editor and look for entries that redirect common domains (google.com, microsoft.com) to incorrect IP addresses — these are signs of malware modification. Remove any suspicious entries.

Step 7: Reinstall network adapter driver

If all above steps fail and DNS is still not resolving, the network adapter driver may be corrupted. On Windows: open Device Manager > Network Adapters > right-click your adapter > Uninstall device > check "Delete the driver software for this device" > reboot. Windows will reinstall a clean driver on restart. Download the latest driver from the adapter manufacturer's website for best results.

Frequently Asked Questions

What causes DNS not resolving?

The most common causes are a corrupted local DNS cache (fixed by flushing), ISP DNS servers that are temporarily down or slow (fixed by switching to 1.1.1.1 or 8.8.8.8), a router that has lost its DNS server assignment (fixed by rebooting), or a VPN routing DNS queries through a broken tunnel. Less commonly, malware modifies the hosts file or DNS settings, and driver corruption prevents DNS queries from being sent correctly.

Is 1.1.1.1 or 8.8.8.8 DNS faster?

Cloudflare's 1.1.1.1 is consistently the fastest public DNS resolver in independent benchmarks, with average query times under 15 ms globally. Google's 8.8.8.8 is slightly slower on average but has an excellent reliability record. Both are dramatically faster than most ISP DNS servers, which typically respond in 30 to 80 ms. For most users, 1.1.1.1 as primary and 8.8.8.8 as secondary provides the best combination of speed and redundancy.

How do I know if DNS is my problem?

The definitive test: run ping 8.8.8.8 in Command Prompt or Terminal. If the ping returns successful replies but your browser shows DNS errors or can't load websites, DNS is the confirmed problem — your internet connection works but name resolution is failing. You can also try navigating directly to an IP address such as http://142.250.80.46 (a Google server) — if it loads but google.com doesn't, DNS is the issue.

Related Guides

More From This Section

Related Fixes