You open Safari or Chrome, type in a URL, and get hit with a message saying the DNS server isn't responding. Your internet connection shows as connected, but nothing loads. This is one of the most frustrating network errors on macOS because the cause is not always obvious — it could be your Mac's DNS cache, your router, your ISP's DNS servers, or a misconfigured network interface. This guide walks through every likely cause in order from fastest to most involved, so you can get back online without wasting time on fixes that don't apply to your situation.

What Does "DNS Server Isn't Responding" Actually Mean

DNS (Domain Name System) translates human-readable domain names like example.com into IP addresses that computers use to route traffic. When your Mac sends a DNS query and gets no answer back within a timeout window, the browser reports that the DNS server isn't responding. The page never loads because your Mac never found out what IP address to connect to.

This is different from a server being down. The website you're trying to reach could be perfectly healthy — your Mac just can't resolve its address. That distinction matters because the fix is entirely on your end, not the site's.

Quick Diagnosis Before You Start Fixing

Open Terminal (Applications > Utilities > Terminal) and run these two commands to confirm DNS is actually the culprit and identify which server is failing.

ping 8.8.8.8 nslookup google.com

If ping 8.8.8.8 succeeds but nslookup google.com times out or returns a server failure, DNS resolution is broken. If ping itself fails, you may have a broader connectivity issue — check your Wi-Fi connection or Ethernet cable first.

Also check which DNS server your Mac is currently using:

scutil --dns | grep nameserver

This shows the DNS servers assigned to your active interface. Note these addresses — you'll need them if you want to compare before and after your fixes.

Fix 1: Flush the DNS Cache on macOS

macOS caches DNS responses to speed things up, but a corrupted or stale cache can cause resolution failures even when the DNS server itself is fine. Flushing the cache forces your Mac to make fresh queries.

The command varies slightly by macOS version. Open Terminal and use the one that matches your system:

macOS Ventura, Monterey, Big Sur, Catalina (10.15+):

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

macOS Mojave and High Sierra (10.13–10.14):

sudo killall -HUP mDNSResponder

macOS Sierra and El Capitan (10.11–10.12):

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

You'll be prompted for your admin password. The command produces no output on success — that is expected. After flushing, reopen your browser and test the same URL. If it works, the stale cache was the culprit. If not, continue to the next fix.

Fix 2: Change Your DNS Servers to a Public Resolver

Your ISP assigns DNS servers automatically via DHCP. Those servers are sometimes slow, unreliable, or temporarily down. Switching to a fast, reliable public DNS resolver is one of the highest-impact fixes you can make, and it takes under two minutes.

  1. Open System Settings (macOS Ventura+) or System Preferences (older macOS).
  2. Click Network.
  3. Select your active connection — Wi-Fi or Ethernet — and click Details (Ventura+) or Advanced (older).
  4. Click the DNS tab.
  5. Click the + button and add one or more of the following servers:
  • Cloudflare: 1.1.1.1 and 1.0.0.1
  • Google Public DNS: 8.8.8.8 and 8.8.4.4
  • Quad9 (with malware blocking): 9.9.9.9 and 149.112.112.112

Remove any existing DNS entries that your ISP set if they look suspicious or are greyed out as editable. Click OK, then Apply. Open a new browser tab and test your connection.

💡 After changing DNS servers, propagation of your new settings is instant locally, but if you want to verify that a domain is resolving correctly from multiple global locations, use the DNS Propagation Checker to confirm the right IP is being returned worldwide.

Fix 3: Renew Your DHCP Lease

A stale DHCP lease can cause your Mac to hold onto old DNS server addresses from your router that are no longer valid. Renewing the lease forces your Mac to request fresh network settings including DNS.

  1. Open System Settings > Network.
  2. Select your active connection and click Details.
  3. Click the TCP/IP tab.
  4. Click Renew DHCP Lease.
  5. Click OK and then Apply.

Alternatively, you can do this from Terminal:

sudo ipconfig set en0 DHCP

Replace en0 with your actual interface name. Run ifconfig to list all interfaces — look for the one marked as active with an assigned IP address. Wi-Fi is typically en0 or en1; Ethernet is often en0 on older Macs.

Fix 4: Restart and Reset Your Router

If multiple devices on the same network are having DNS issues, the problem is almost certainly your router rather than any individual Mac. The router runs its own DNS resolver or forwards queries to your ISP's servers, and that process can lock up.

First, do a simple power cycle: unplug your router from power, wait 30 seconds, plug it back in, and wait two minutes for it to fully reconnect to your ISP.

If that doesn't work, log into your router admin panel and set the DNS servers there directly. Your router then pushes those DNS servers to all devices on the network via DHCP.

  • ASUS routers: asusrouter.com — go to WAN > WAN DNS Setting
  • TP-Link routers: tplinkwifi.net — go to Advanced > Network > Internet
  • Netgear routers: routerlogin.net — go to Internet > Domain Name Server (DNS) Address
  • Most other routers: Try 192.168.1.1 or 192.168.0.1 in your browser

In the DNS fields, enter 1.1.1.1 and 1.0.0.1 (or your preferred public resolver), save the settings, and reboot the router. All devices on your network will pick up the new DNS servers the next time they renew their DHCP lease.

Fix 5: Delete and Recreate Your Network Location

macOS stores network configurations in location profiles. A corrupted network location can cause persistent DNS failures even after you change settings, because macOS keeps reverting to broken cached values.

  1. Open System Settings > Network.
  2. Click the Location dropdown at the top (in older macOS it's in the sidebar menu under the gear icon).
  3. Select Edit Locations.
  4. Click the + button to create a new location, name it anything (e.g., "Home 2"), and click Done.
  5. Switch to your new location and reconfigure your Wi-Fi or Ethernet connection including DNS settings.

If the new location resolves DNS correctly, the old profile was corrupted. You can delete it from the same Edit Locations menu.

Fix 6: Remove Conflicting DNS Configuration Files

Third-party VPNs, corporate management profiles, and some security software write custom DNS resolver configurations to /etc/resolv.conf or drop files into /etc/resolver/. These can override your System Settings DNS and send queries to servers that are offline or misconfigured.

Check what's in resolv.conf:

cat /etc/resolv.conf

On a stock macOS system this file is managed automatically and typically points to 127.0.0.1 (the local mDNSResponder). If you see hardcoded IP addresses from a VPN or corporate policy that you no longer use, those entries may be stale.

Check for per-domain resolver files:

ls /etc/resolver/

If you see domain-specific files for domains you don't need custom resolution for, those may be causing lookup failures. Remove them carefully:

sudo rm /etc/resolver/yourdomain.example

After removing files, flush the DNS cache again using the commands from Fix 1.

Fix 7: Check for macOS Firewall or Security Software Interference

Firewall rules and third-party security tools like Little Snitch, Malwarebytes, or corporate endpoint agents can block DNS traffic on port 53. If DNS queries can't leave your machine, you'll get the same "server isn't responding" error even though your network and DNS servers are healthy.

Temporarily disable any third-party firewalls or security agents and test DNS:

nslookup google.com 8.8.8.8

This command queries Google's DNS directly on port 53. If it works with the firewall off but fails with it on, you need to add a rule in your security software to allow outbound UDP and TCP traffic on port 53 to your chosen DNS servers.

Also check macOS's built-in Application Firewall: System Settings > Privacy and Security > Firewall. Make sure it's not set to block all incoming connections, which on some configurations also affects outbound DNS behavior.

How to Verify DNS Is Working After Your Fix

Don't rely solely on opening a browser tab — browsers cache aggressively and can show old results. Use Terminal to verify DNS resolution is genuinely working from the command line:

nslookup apple.com nslookup google.com nslookup cloudflare.com

Each command should return an answer section with one or more IP addresses and a short response time. If you see SERVFAIL or connection timed out, DNS is still broken. If you see valid IPs, resolution is working and you can reopen your browser.

You can also use the DNS Lookup tool to verify that a specific domain resolves to the correct records from outside your network, which rules out local-only caching issues.

How to Prevent This from Happening Again

The most reliable long-term fix is to set static DNS servers on your router so every device on the network benefits, rather than configuring each Mac individually. Use Cloudflare (1.1.1.1) or Google (8.8.8.8) as your primary and secondary — both have near-100% uptime track records and are substantially faster than most ISP-provided resolvers.

If you're on a laptop that moves between networks, set DNS at the Mac level as described in Fix 2. Those settings will override DHCP-assigned DNS on every network you join.

Additionally, keep macOS up to date. Apple regularly patches mDNSResponder bugs and network stack issues that can cause intermittent DNS failures. Running an outdated version of macOS on a modern router firmware can create incompatibilities that are otherwise avoidable.

For users who deal with DNS problems frequently, consider running a local DNS resolver like dnsmasq via Homebrew. It caches responses aggressively and forwards to multiple upstream resolvers, making your Mac resilient to upstream failures:

brew install dnsmasq

Configuring dnsmasq is beyond the scope of this article, but it is the gold standard for power users who need consistent, fast DNS resolution regardless of network conditions.

Summary of Fixes in Order

  1. Flush DNS cache with sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  2. Switch to public DNS (1.1.1.1 / 8.8.8.8) in System Settings > Network > DNS tab
  3. Renew your DHCP lease from the TCP/IP tab or via sudo ipconfig set en0 DHCP
  4. Power cycle your router; optionally set DNS on the router itself
  5. Delete and recreate your macOS network location
  6. Remove stale VPN or corporate DNS config files from /etc/resolver/
  7. Check for firewall or security software blocking port 53

Work through these in order and you'll resolve the problem at the fastest possible point. Most users are fixed by steps 1 or 2 alone.