Windows DNS Error Codes: What Each One Means and the Fix
In this article
Most Windows DNS errors mean your computer cannot reach the DNS server that turns website names into addresses, and the usual fix is to flush the DNS cache and switch to a public DNS server such as Google DNS or Cloudflare. If the error mentions "DNS server not responding" or shows a code like DNS_PROBE_FINISHED_NXDOMAIN, the steps below fix it in most cases.
Time 20 min · Steps 7 · Level Easy
Fix a DNS Error in Windows, Step by Step
- Flush the DNS cache. Open Command Prompt as administrator (right-click Start, choose Command Prompt (Admin) or Windows Terminal (Admin)) and run
ipconfig /flushdns. A successful run prints "Successfully flushed the DNS Resolver Cache". - Release and renew your IP address. In the same window run
ipconfig /releasethenipconfig /renew. This asks your router for fresh network settings, including the DNS server it hands out. - Reset the network stack. Run
netsh int ip resetand then restart the computer. This restores Windows' default TCP/IP configuration, which fixes errors caused by a corrupted network setup. - Switch to a public DNS server. Open Settings > Network & internet > your connection > DNS server assignment > Edit, choose Manual, turn on IPv4, and enter 8.8.8.8 as preferred and 8.8.4.4 as alternate DNS (or 1.1.1.1 and 1.0.0.1 for Cloudflare). Labels can differ slightly by Windows version.
- Restart the router. Unplug the router from power for 30 seconds, plug it back in, and wait about 2 minutes for it to fully reconnect. A hung router is a frequent cause of "DNS server not responding" on every device in the house.
- Test in a different browser or device. If another browser or another device on the same network loads the site, the problem is in the Windows network settings, not the connection itself.
- Temporarily disable security software's DNS shield. Some antivirus and firewall tools intercept DNS requests. If the error disappears while the feature is off, re-enable it and add an exception or update the software instead of leaving it off.
Match Your Error Code to Its Cause
Each DNS error points at a different layer of the chain between your browser and the website, so the code tells you where to start. Confirm the code first: in Chrome and Edge it appears on the error page itself; in Windows, open Command Prompt and run nslookup example.com to see whether Windows can resolve a name at all. If nslookup times out, the problem is between your computer and the DNS server. If nslookup works but the browser fails, the problem is the browser cache or a browser extension.
DNS_PROBE_FINISHED_NXDOMAIN
This browser error means the name could not be resolved at all. It usually points to a stale or poisoned DNS cache on your computer. Flush the cache as in step 1, clear the browser's cached data, and if it persists, change the DNS server as in step 4. If only one website fails, that site's own DNS may be broken, and there is nothing to fix on your side.
"DNS server not responding"
Windows shows this when the DNS server your router handed out never answers. Confirm it by running ipconfig /all and checking the DNS Servers line. If it lists only the router's address, switch to a public DNS server (step 4). If every device in the house has the same error, restart the router (step 5) before touching Windows settings.
ERR_NAME_NOT_RESOLVED
A close cousin of NXDOMAIN, this error often appears when the typed address has a typo or the site's subdomain does not exist. Check the spelling first, then flush the cache. If it appears on a site you visit often, your hosts file may have a stale entry: open Notepad as administrator, open C:\Windows\System32\drivers\etc\hosts, and check for lines mapping that site's name to a wrong address.
Windows Sockets errors and "Unknown error"
When DNS fails alongside general network errors, the Windows network stack itself is corrupted. The netsh int ip reset command in step 3 is the fix; follow it with netsh winsock reset and a restart. Note that resetting the stack removes static IP settings and may remove saved Wi-Fi networks, so you may need to re-enter your Wi-Fi password.
Quick Checks Before You Change Anything
Run through this list in order; it takes about 5 minutes and rules out the simple causes before you reset anything. Each check either confirms the cause or eliminates one layer, so you stop guessing.
- Try three websites: one big service, one ordinary site, and one you rarely visit. If all fail, it is DNS or the connection; if only one fails, that site is the problem.
- Try the site on a phone using mobile data instead of Wi-Fi. If it loads on mobile data, the fault is your router or its DNS, not Windows.
- Run
ping 8.8.8.8in Command Prompt. If numbers come back, your internet works and only name resolution is broken, which is exactly what the DNS fixes above address. If it times out, you have a connection problem instead. - Check whether the router's DNS setting itself is wrong: log in to the router's admin page (usually reached through a browser) and set its DNS to 8.8.8.8 so every device in the house benefits.
- Undo any recent VPN or proxy software, which routes DNS through its own servers. Disconnect it fully and test again before changing Windows settings.
When the Error Comes Back After a Fix
A DNS error that returns after flushing and switching servers usually means something on the computer keeps rewriting the DNS settings. Check the hosts file as described under ERR_NAME_NOT_RESOLVED, since malware sometimes edits it. Then check Settings > Network & internet > Proxy and turn off any proxy you did not set yourself. If Windows keeps reverting your DNS to an address you do not recognise, run a full scan with Windows Security and remove any VPN or "network optimiser" tools you do not use. On a work computer, stop there: IT departments often set DNS deliberately, and changing it can break internal tools. Ask your IT support to check it instead.
Official source: Microsoft Support