You open Chrome, type a URL, and instead of the page you get a plain white screen with a red warning: DNS lookup failed (or ERR_NAME_NOT_RESOLVED). For a developer or security learner, this is both frustrating and informative — it tells you that your browser cannot translate the domain name into an IP address. The problem might be in your network, your system configuration, or even in Chrome itself. Below is a structured, practical guide to diagnosing and resolving this error without resorting to guesswork.
What Exactly Does “DNS Lookup Failed” Mean?
DNS (Domain Name System) is the phonebook of the internet. When you type example.com, your computer sends a query to a DNS server (usually provided by your ISP or a public resolver like 8.8.8.8) asking for the corresponding IP address. If that query fails — because the server is unreachable, the domain doesn’t exist, or the response is blocked — Chrome shows the DNS lookup failed error. The browser itself is not broken; it’s reporting a network-layer problem.
First Things First: Is It Just Chrome?
Before diving into system settings, check if the error is browser-specific. Try the same URL in another browser (Firefox, Edge, or a command-line tool like curl). If other browsers load the site fine, the issue is likely Chrome’s internal DNS cache or a corrupted profile. If no browser works, the problem lies deeper — in your network stack, DNS server, or firewall.
Also test a different domain. If google.com resolves but your-dev-project.local does not, you’re probably dealing with a local development hostname or a domain that genuinely doesn’t exist.

Common Causes and Targeted Fixes
1. Stale DNS Cache in Chrome
Chrome maintains its own DNS cache separate from the operating system. You can clear it without affecting other browsers. Navigate to chrome://net-internals/#dns and click the “Clear host cache” button. Then go to chrome://net-internals/#sockets and click “Flush socket pools”. Restart Chrome and try again.
2. Operating System DNS Cache
Your OS also caches DNS responses. On Windows, open Command Prompt as Administrator and run:
ipconfig /flushdns
On macOS, use:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
On Linux (systemd-resolved):
sudo systemd-resolve --flush-caches
After flushing, the next DNS query will fetch a fresh record.
3. Wrong or Unreachable DNS Server
Your computer might be configured to use a DNS server that is slow, down, or blocking certain domains. Check your network adapter settings or router configuration. Temporarily switch to a public resolver like Google (8.8.8.8, 8.8.4.4) or Cloudflare (1.1.1.1). On Windows, you can change DNS in Network & Internet settings; on Linux, edit /etc/resolv.conf (note: some distros overwrite this).
Test the current DNS server directly from the command line:
nslookup example.com
If that returns “server failed” or “no response from server”, your DNS is the culprit. Try specifying a different server:
nslookup example.com 8.8.8.8
If that works, change your system DNS to 8.8.8.8.
4. Hosts File Overrides
Your system’s hosts file can map domains to IP addresses manually. A misconfigured or malware-altered hosts file can cause DNS lookup failures. On Windows, the file is at C:WindowsSystem32driversetchosts. On Linux/macOS, it’s /etc/hosts. Open it with a text editor (as administrator on Windows) and look for lines that redirect the domain you’re trying to reach. A typical entry looks like:
127.0.0.1 example.com
If you see an entry for a legitimate site that shouldn’t be there, comment it out with # or delete it. Be careful — developers often use hosts files to redirect local dev domains, so only modify entries you understand.
5. Firewall or Antivirus Blocking DNS
Some security software intercepts DNS queries to filter content. Temporarily disable your firewall or antivirus (or add an exception for Chrome) to see if that resolves the error. If it does, reconfigure the software to allow DNS traffic on port 53 (UDP/TCP).
6. Proxy or VPN Interference
A misconfigured proxy or a VPN that doesn’t handle DNS correctly can break resolution. In Chrome, go to Settings > System > Open your computer’s proxy settings and ensure “Automatically detect settings” is on and no manual proxy is set unless you intentionally use one. If you’re on a VPN, try disconnecting and testing again. Some VPNs use their own DNS servers that may fail for certain domains.
Developer-Specific Scenarios
Local Development Domains
If you’re running a local server (e.g., with Docker, XAMPP, or a Node.js app) and using a custom domain like myapp.local, Chrome may not resolve it because no public DNS knows about it. The fix is to add an entry in your hosts file pointing myapp.local to 127.0.0.1. Alternatively, use a local DNS resolver like dnsmasq or a tool like ngrok for public testing.
Using Secure DNS (DoH) in Chrome
Chrome supports DNS-over-HTTPS, which encrypts your DNS queries. This can sometimes cause lookup failures if the DoH provider is blocked or misconfigured. Go to chrome://settings/security and scroll to “Advanced” > “Use secure DNS”. You can choose a custom provider (e.g., Cloudflare) or disable it temporarily to see if the error goes away. For security-conscious developers, keeping DoH enabled is recommended, but ensure your chosen provider is reachable from your network.

Diagnostic Tools for Deeper Investigation
When the basic fixes don’t work, use command-line tools to pinpoint the failure:
nslookup(Windows, macOS, Linux) — queries DNS servers and shows the response. Usenslookup -debug example.comfor verbose output.dig(Linux, macOS) — more detailed than nslookup. Example:dig example.com @8.8.8.8.ping— tests if the IP address is reachable. If DNS resolves but ping fails, the problem is beyond DNS.traceroute(Windows:tracert) — shows the path packets take to the destination. A stop at a certain hop may indicate a firewall or routing issue.curl -v— shows the full HTTP request/response, including DNS resolution time.
If you’re on Linux and want to learn more about network configuration, our guide on Which Linux Distribution Should You Start With? includes tips on checking network settings in different distros.
When the Error Is a Security Signal
While most DNS lookup failures are benign network glitches, they can occasionally indicate a security issue. If you suddenly cannot reach a site you visited before, and other sites work, consider the possibility of DNS spoofing or a compromised router. Check that your router’s DNS settings haven’t been changed (default should be your ISP’s or a known public resolver). Also, look for unexpected entries in your hosts file — malware sometimes redirects banking or email domains to phishing sites. Running a trusted antivirus scan is a good precaution, but avoid any tools that claim to “hack” DNS — stick to legitimate security software.
For a broader understanding of network security and local service discovery, you might find our post on Zero Configuration Networking (Zeroconf) for Beginners: How It Works and How to Secure It useful — it explains how devices find each other on a local network and how to protect that process.
A Final Concrete Step
If you’ve tried everything above and the error persists for a specific domain, test DNS resolution from a completely different network — for example, use your phone’s mobile hotspot. If it works there, the issue is with your home or office network (router, ISP, or local firewall). If it fails everywhere, the domain itself may be down or misconfigured. In that case, use a site like downforeveryoneorjustme.com (manually typed, not linked) to check. For developers, always keep a terminal open with nslookup ready — it’s the fastest way to separate a Chrome problem from a network problem.
