Skip to content

Fix ERR_NAME_NOT_RESOLVED on Windows by Replacing Broken DNS Settings

Shivam Malani
Fix ERR_NAME_NOT_RESOLVED on Windows by Replacing Broken DNS Settings

The ERR_NAME_NOT_RESOLVED error appears when your browser cannot translate a domain name into an IP address. Your internet connection may seem fine for some apps, yet the browser refuses to load pages — or Windows itself reports "not connected" even though traffic is flowing. The root cause is almost always a DNS problem: a misconfigured server address, stale cache entries, broken IPv6 DNS settings, or firewall interference preventing lookups from completing.

Quick answer: Open your network adapter settings, disable IPv6 if its DNS fields are empty or incorrect, then set IPv4 DNS to a reliable public resolver like Cloudflare (1.1.1.1 / 1.0.0.1) or Google (8.8.8.8 / 8.8.4.4). Flush the DNS cache with ipconfig /flushdns in an elevated Command Prompt and restart your browser.


Why ERR_NAME_NOT_RESOLVED happens

When you type a URL, your operating system sends a DNS query to resolve the hostname into a numeric IP address. If the configured DNS server is unreachable, slow, or returns an invalid response, the browser gives up and throws ERR_NAME_NOT_RESOLVED. Several conditions lead to this failure:

CauseWhat goes wrong
Incorrect or blank DNS server addressesThe adapter has no valid resolver to query, so every lookup fails immediately.
Stale DNS cacheWindows or the browser cached an old IP for a domain that has since changed, and the outdated record blocks resolution.
Broken IPv6 DNS configurationIPv6 is enabled on the adapter but its DNS fields point nowhere, causing lookups to time out before falling back to IPv4.
Firewall or antivirus interferenceSecurity software blocks outbound DNS traffic (port 53) or filters responses incorrectly.
Router DNS issuesThe router's own DNS relay is slow or misconfigured, delaying first-lookup responses long enough to trigger the error.
Corrupted Winsock catalogThe Windows Sockets API entries are damaged, preventing network name resolution at the OS level.

A particularly sneaky variant occurs when IPv6 DNS is misconfigured on your Wi-Fi adapter while IPv4 works. Windows may report "no internet" in the taskbar because the IPv6 connectivity check fails, yet most apps still function over IPv4. The browser, however, may intermittently try the broken IPv6 path first and throw ERR_NAME_NOT_RESOLVED before it falls back.


Replace broken DNS settings on the network adapter

Switching from your ISP's default (or a blank) DNS configuration to a known-good public resolver is the single most effective fix. Cloudflare's 1.1.1.1 and Google's 8.8.8.8 are fast, widely available, and rarely the source of resolution failures.

Step 1: Press Windows + R, type ncpa.cpl, and press Enter. This opens the Network Connections window showing all adapters.

Step 2: Right-click your active adapter (Wi-Fi or Ethernet) and choose Properties.

Step 3: Select Internet Protocol Version 4 (TCP/IPv4) and click Properties. Choose "Use the following DNS server addresses" and enter your preferred servers. For Cloudflare, set the preferred server to 1.1.1.1 and the alternate to 1.0.0.1. For Google, use 8.8.8.8 and 8.8.4.4. Click OK.

Step 4: If you suspect IPv6 DNS is the culprit, scroll down in the adapter properties list, uncheck Internet Protocol Version 6 (TCP/IPv6) entirely, and click OK. This forces all DNS traffic over IPv4 and eliminates the timeout caused by empty or broken IPv6 DNS fields.

Step 5: Close the properties dialogs and try loading a website. If pages resolve instantly, the old DNS configuration was the problem.

Note: Disabling IPv6 is a targeted workaround. If your network requires IPv6, you can instead open the IPv6 properties and manually set its DNS servers to Cloudflare's IPv6 resolvers (2606:4700:4700::1111 and 2606:4700:4700::1001) rather than disabling the protocol.


Flush the DNS cache in Windows

Even after pointing to a new DNS server, Windows may still serve stale cached records. Flushing the cache forces fresh lookups against the new resolver.

Step 1: Press Windows + S, type Command Prompt, right-click the result, and select Run as Administrator. Confirm the UAC prompt.

Step 2: Run the following commands one at a time, pressing Enter after each:

ipconfig /flushdns
ipconfig /registerdns
ipconfig /release
ipconfig /renew

Step 3: Close the Command Prompt and open your browser. Navigate to the site that previously failed. A successful page load confirms the stale cache was contributing to the error.


Clear the browser's internal DNS cache

Browsers maintain their own DNS caches independently of Windows. Google Chrome is especially aggressive about caching host records to speed up page loads, which means a bad entry can persist even after you flush the OS cache.

Step 1: In Chrome, type chrome://net-internals/#dns into the address bar and press Enter.

Step 2: Click Clear host cache.

Step 3: Restart Chrome completely (close all windows, not just the active tab) and revisit the affected site.

Firefox users can accomplish the same thing by clearing cookies and cached web content through Settings → Privacy & Security → Cookies and Site Data → Clear Data. In Microsoft Edge, go to Settings → Privacy, search, and services → Choose what to clear, set the time range to All time, select cached images and files plus cookies, and click Clear now.


Reset the Winsock catalog

If DNS changes and cache flushes do not resolve the error, the Windows Sockets API catalog may be corrupted. Resetting it restores default network configuration entries that DNS resolution depends on.

Step 1: Open an elevated Command Prompt (the same way described above).

Step 2: Run these two commands:

netsh int ip set dns
netsh winsock reset

Step 3: Restart your computer. After reboot, Windows rebuilds the Winsock catalog from scratch. Test browsing again.


Reset Windows Firewall to defaults

Custom firewall rules sometimes block outbound DNS queries on port 53 without any obvious warning. Restoring the firewall to its factory state eliminates that possibility.

Step 1: Press Windows + R, type firewall.cpl, and press Enter.

Step 2: Click Restore defaults in the left-side menu, then confirm by clicking the Restore defaults button. You may need to reconfigure any custom rules for specific applications afterward.

Tip: If you use a third-party antivirus with its own firewall component, temporarily disable it as well. Some security suites intercept DNS traffic for filtering purposes and can break resolution if misconfigured. If disabling the antivirus fixes the error, check its DNS or web-protection settings rather than leaving it off permanently.


Disable browser page preloading

Chrome, Firefox, and Edge all offer a feature that prefetches DNS records and preloads pages you might click. When this prefetching encounters a DNS failure, it can surface ERR_NAME_NOT_RESOLVED for links you have not even clicked yet.

BrowserWhere to disable
Google ChromeSettings → Privacy and Security → Cookies and other site data → toggle off "Preload pages for faster browsing and searching"
FirefoxType about:config in the address bar → search for network.dns.disablePrefetch → set value to true
Microsoft EdgeSettings → search for "preload" → disable "Preload the new tab page for a faster experience"

Restart the browser after making the change. Disabling preloading has minimal impact on perceived speed for most users and removes a common source of spurious DNS errors.


Edit the hosts file as a targeted bypass

If only one specific domain triggers ERR_NAME_NOT_RESOLVED, you can add its IP address directly to the Windows hosts file. This bypasses DNS entirely for that hostname and also helps you confirm whether the problem is on your machine or on the remote server.

Step 1: Find the site's current IP address by running nslookup example.com 1.1.1.1 in Command Prompt (replace example.com with the actual domain). Note the returned IP.

Step 2: Open Notepad as Administrator, then open the file at C:\Windows\System32\drivers\etc\hosts.

Step 3: Add a new line at the bottom in the format 93.184.216.34 example.com (use the actual IP and domain). Save the file and try loading the site. If it works, the issue was DNS resolution on your end. Remove the hosts entry once you have confirmed a permanent DNS fix.


Fix ERR_NAME_NOT_RESOLVED on Linux

Linux resolves DNS through the /etc/resolv.conf file. If this file points to a non-functional nameserver, every lookup fails.

Step 1: Open a terminal with Ctrl + T and edit the resolver configuration:

sudo nano /etc/resolv.conf

Step 2: Replace existing nameserver lines (or add new ones) with reliable public DNS servers:

nameserver 8.8.8.8
nameserver 8.8.4.4

Step 3: Save with Ctrl + X, then Y to confirm. To prevent network managers from overwriting your changes on reboot, make the file immutable:

sudo chattr +i /etc/resolv.conf

Step 4: Reboot the machine and test with ping example.com or open a browser.


How to verify the fix worked

After applying any of the methods above, a quick verification confirms that DNS resolution is functioning correctly. Open Command Prompt (or a terminal on Linux) and run:

nslookup example.com

If the command returns a valid IP address without errors, your DNS path is healthy. In the browser, the ERR_NAME_NOT_RESOLVED message should no longer appear, and pages should begin loading on the first attempt without a delay. On Windows, the taskbar network icon should also stop showing the misleading "no internet" warning if the underlying cause was broken IPv6 DNS — disabling IPv6 or fixing its DNS fields resolves both the browser error and the system-level connectivity indicator.


Most ERR_NAME_NOT_RESOLVED cases come down to one thing: the DNS server your machine is trying to reach either does not exist, is unreachable, or is returning bad data. Replacing those settings with a known-good public resolver, flushing every layer of DNS cache (OS and browser), and ruling out firewall interference covers the vast majority of scenarios. If the error persists after all of these steps, the problem likely sits on the remote server or domain itself, and contacting the site owner or your hosting provider is the appropriate next step.