If you see “Windows can’t communicate with the device or resource” in the Network Diagnostics tool, it usually means your PC cannot reach a specific server, router, or website—often due to a DNS problem, a firewall rule, or a misconfigured network adapter. The fastest fix is to flush your DNS cache and reset the TCP/IP stack, but if that doesn’t work, you’ll need to check your proxy settings, firewall, and router. This guide walks through each step in order, from quick wins to deeper troubleshooting.
What This Error Actually Means
The message appears after Windows runs its built-in Network Diagnostics (often triggered automatically when a website fails to load). The full text usually reads: “Windows can’t communicate with the device or resource (primary DNS server)” or “… (the device or resource) is not responding.” The parenthetical part tells you what failed: it could be your DNS server, your default gateway, or a specific website’s IP address.
In plain terms, your computer sent a request but never got the expected reply. That can happen for many reasons, including:
- DNS cache corruption or wrong DNS server addresses
- A firewall (Windows Defender or third-party) blocking the connection
- Proxy settings that are misconfigured or left over from a VPN
- Network adapter drivers that are outdated or buggy
- Router or modem issues, like a hung DHCP lease
Understanding which resource failed helps narrow the fix. If it says “primary DNS server,” focus on DNS. If it says “default gateway,” focus on your router and IP settings.
Quick Fixes That Resolve Most Cases
Start with these three steps; they solve a large percentage of issues without needing advanced tools.
- Restart your router and PC. Unplug the router for 30 seconds, plug it back in, wait for all lights to stabilize, then restart your computer. This clears temporary glitches in both devices.
- Run the built-in network troubleshooter again. Go to Settings > System > Troubleshoot > Other troubleshooters > Network Adapter, and run it. Sometimes the second pass catches what the first missed.
- Disable and re-enable your network adapter. Open Control Panel > Network and Sharing Center > Change adapter settings, right-click your active adapter, choose Disable, wait a few seconds, then Enable.
If the error persists, move on to the command-line fixes below.
Reset DNS and TCP/IP from Command Prompt
Corrupted DNS cache entries or a broken TCP/IP stack are the most common culprits. Windows includes command-line tools to reset both. You’ll need to run Command Prompt as administrator (search for “cmd,” right-click, and select “Run as administrator”).
- Type
ipconfig /flushdnsand press Enter. This clears the local DNS cache. - Type
ipconfig /registerdnsand press Enter. This re-registers your computer with the DNS server. - Type
ipconfig /releasethenipconfig /renewto get a fresh IP address from your router. - Type
netsh winsock resetto reset the Winsock catalog (which stores network protocols). - Type
netsh int ip resetto reset the TCP/IP stack. - Restart your computer.
These commands are safe and don’t delete personal files. After restarting, test the connection again. If the error still appears, move on to DNS server settings.
Change Your DNS Server to a Public One
Sometimes your ISP’s DNS server is slow or temporarily down. Switching to a public DNS server can fix the “cannot communicate with primary DNS server” error almost immediately. Two reliable options are Google Public DNS (8.8.8.8 and 8.8.4.4) and Cloudflare (1.1.1.1 and 1.0.0.1).
- Open Control Panel > Network and Sharing Center > Change adapter settings.
- Right-click your active network adapter (Wi-Fi or Ethernet) and select Properties.
- Select “Internet Protocol Version 4 (TCP/IPv4)” and click Properties.
- Choose “Use the following DNS server addresses.”
- Enter 8.8.8.8 and 8.8.4.4 (or 1.1.1.1 and 1.0.0.1).
- Click OK, then close all windows.
You can also do this from Command Prompt with netsh interface ip set dns "Wi-Fi" static 8.8.8.8 (replace “Wi-Fi” with your adapter name). This change is reversible—just set it back to “Obtain DNS server address automatically.”
Check Proxy Settings and VPNs
A leftover proxy configuration is a frequent cause of this error, especially after using a VPN or a corporate network. Windows can route all traffic through a proxy that no longer exists, making every connection fail.
- Open Settings > Network & Internet > Proxy.
- Under “Manual proxy setup,” make sure “Use a proxy server” is turned off.
- Under “Automatic proxy setup,” ensure “Automatically detect settings” is on, and “Use setup script” is off (unless you know you need it).
- If you use a VPN, disconnect it temporarily and test again. Some VPN clients modify proxy or DNS settings and don’t restore them properly on exit.
Also check your browser’s proxy settings. In Chrome or Edge, they follow the system settings, so the above should cover it. If you use Firefox, go to Settings > Network Settings and choose “No proxy.”
Disable Firewall or Antivirus Temporarily
Windows Defender Firewall or a third-party antivirus can block the connection, especially if a recent update changed a rule. To test this, temporarily disable the firewall for your network profile.
- Open Windows Security > Firewall & network protection.
- Select your active network (e.g., “Private network”).
- Turn off the firewall toggle. (You’ll turn it back on after testing.)
- Try loading a website. If it works, the firewall was blocking something. Re-enable the firewall, then add an exception or reset the firewall rules.
If you have a third-party antivirus with its own firewall, disable that too. Many such suites include a network shield that can interfere. Remember to re-enable everything after the test.
Update or Reinstall Network Adapter Drivers
Outdated or corrupted drivers can cause intermittent communication failures. Windows Update usually keeps drivers current, but a bad update can break things.
- Right-click the Start button and select Device Manager.
- Expand “Network adapters.”
- Right-click your Wi-Fi or Ethernet adapter and select “Update driver.”
- Choose “Search automatically for drivers.” If none found, go to your PC or adapter manufacturer’s website for the latest driver.
- If the problem started after a recent driver update, roll back the driver instead (Properties > Driver tab > Roll Back Driver).
If updating doesn’t help, uninstall the adapter (right-click > Uninstall device), then restart your PC. Windows will reinstall the driver automatically. This often clears hidden corruption.
Advanced Steps: Winsock Reset and Netsh Commands
If none of the above worked, you can try a more comprehensive reset. The netsh commands we ran earlier only reset the IP stack. You can also reset the Windows Firewall rules to default, which can fix blocked ports.
- Open Command Prompt as administrator.
- Type
netsh advfirewall resetand press Enter. This restores all firewall rules to their default state. - Type
netsh int ip reset resetlog.txtand press Enter. - Type
netsh winsock resetagain, then restart.
If you’re comfortable with more aggressive fixes, you can also release and renew your DHCP lease via ipconfig /release and ipconfig /renew as mentioned earlier. For persistent issues, consider resetting your network settings entirely via Settings > Network & Internet > Advanced network settings > Network reset. This removes all network adapters and reinstall them, and resets many settings to default. You’ll need to reconnect to Wi-Fi afterward.
Frequently Asked Questions
Why does the error say “primary DNS server” when I have internet?
It can happen if your DNS server is slow to respond, even though other traffic (like a direct IP connection) works. The error means the DNS lookup timed out. Switching to a public DNS server usually fixes it immediately.
Will resetting TCP/IP delete my files or programs?
No. The netsh int ip reset and netsh winsock reset commands only reset network settings and protocol catalogs. They do not touch your documents, applications, or personal data. You may need to reconfigure static IP addresses or VPN connections afterward.
Can a VPN cause this error even after I disconnect?
Yes. Some VPN clients modify DNS settings or leave a virtual adapter behind. After disconnecting, the system may still route DNS through a dead interface. Check your network adapters for any “TAP” or “Virtual” adapters and disable them if they’re not in use. Also check proxy settings as described above.
Is it safe to disable Windows Firewall to test?
Temporarily, yes, but only for a minute. Disabling the firewall leaves your PC more vulnerable to network attacks, especially on public Wi-Fi. Do the test, then re-enable it immediately. If the error goes away, instead of leaving the firewall off, add an exception for the specific app or port that needs it.
Why does this error happen on one computer but not others on the same network?
If other devices work fine, the problem is local to your PC. Common causes include a corrupted DNS cache, a misconfigured proxy, a faulty network driver, or a firewall rule specific to that machine. The steps above are ordered from most likely to least likely for a single-PC issue.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Error 0x8007025d in Windows 10
- Fix Alexa App Stuck on Setup
- Android Camera for 7 Office Tasks: Step-by-Step
- Pair Phone to Pioneer Stereo After Bluetooth Reset
- Fix Windows Not Saving Remote Desktop Credentials
- Essential Tips for macOS Users Switching to Windows