Network2026-06-20

How to Fix Slow DNS Lookups: 6 Proven Fixes

Slow DNS lookups delay every website you visit. Learn how to fix slow DNS — switch to a faster resolver, flush the cache, rule out VPN/antivirus interference, and diagnose the problem with dig and nslookup.

dnsnetworkingdevopsinfrastructuresysadmin

How to Fix Slow DNS Lookups: 6 Proven Fixes

To fix slow DNS lookups, switch to a faster public resolver (like Cloudflare 1.1.1.1 or Google 8.8.8.8), flush your DNS cache, and disable conflicting VPN or antivirus DNS settings. Those three steps resolve the large majority of slow-resolution problems — below are all six fixes, in order of impact.

A DNS lookup is the first thing that happens when you load any website: your device asks a DNS resolver to translate a domain like github.com into an IP address. If that step is slow, every page you visit feels sluggish before a single byte of content loads. Here's how to diagnose and fix it.

First, Confirm DNS Is Actually the Problem

Before changing anything, measure your resolution time so you know whether DNS is the bottleneck.

# Linux / macOS — look at the "Query time" line
dig github.com

# Windows
nslookup github.com

A healthy DNS query completes in 1–30 ms from a cached resolver. If you're seeing 100 ms+ consistently, DNS is worth fixing. Compare against a known-fast resolver:

dig @1.1.1.1 github.com
dig @8.8.8.8 github.com

If querying 1.1.1.1 directly is fast but your default lookups are slow, your current resolver is the culprit — go straight to Fix 1.

Fix 1: Switch to a Faster DNS Resolver

Your ISP's default DNS server is often the slowest option. Public resolvers run anycast networks with servers close to you:

Resolver Primary Secondary
Cloudflare 1.1.1.1 1.0.0.1
Google 8.8.8.8 8.8.4.4
Quad9 (security-filtered) 9.9.9.9 149.112.112.112

Windows: Settings → Network & Internet → your adapter → Edit DNS settings → Manual → enter the addresses. macOS: System Settings → Network → Details → DNS → add the servers. Router (best): set it once in your router's DHCP/DNS settings and every device on the network benefits.

Fix 2: Flush the DNS Cache

A stale or poisoned cache causes slow or failed lookups. Clearing it forces fresh resolution:

# Windows
ipconfig /flushdns

# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

# Linux (systemd-resolved)
sudo resolvectl flush-caches

Fix 3: Rule Out VPN, Antivirus, and "Secure DNS"

These tools frequently intercept or reroute DNS, adding latency:

  • VPNs push all DNS through the VPN tunnel. Test with the VPN off.
  • Antivirus/firewall suites (and some "web protection" features) proxy DNS. Temporarily disable to compare.
  • Browser DNS-over-HTTPS (DoH) can conflict with system DNS. In Chrome: Settings → Privacy and security → Security → "Use secure DNS" — try toggling it.

Fix 4: Check for a Slow or Failing Router

If dig @1.1.1.1 is fast but your router-assigned DNS is slow, the router itself may be the bottleneck — overloaded, running old firmware, or relaying to a slow ISP resolver.

  • Reboot the router.
  • Update its firmware.
  • Override the router's DNS with 1.1.1.1 / 8.8.8.8 (Fix 1).

Fix 5: Lower TTLs on Records You Control

If you run the domain and changes seem slow to take effect, that's not lookup latency — it's caching governed by the record's TTL (Time To Live). Before a migration, lower TTLs to 300 (5 minutes) 24–48 hours in advance so changes propagate quickly, then raise them back afterward. See DNS Record Types Explained for a full TTL strategy.

Fix 6: Diagnose the Resolution Chain

If lookups are still slow, trace where the delay happens:

# Walk the full delegation chain from the root servers
dig +trace github.com

# Query the domain's authoritative nameserver directly,
# bypassing every cache
dig @ns1.example.com example.com

If the authoritative server is slow, the problem is on the domain's side, not yours. If only your local path is slow, it's a resolver, router, or ISP issue.

Verify the Fix in Your Browser

After applying these, confirm real-time resolution with our DNS Lookup tool. It queries authoritative DNS over HTTPS and bypasses your local cache, so you see the current state of any record type for any domain — no software to install. While you're optimizing your network, the Subnet Calculator and CIDR Calculator are handy for planning the addressing behind it.

Frequently Asked Questions

Why are my DNS lookups slow? Usually a slow ISP resolver, a stale local cache, or interference from a VPN/antivirus. Less often, an overloaded router or a slow authoritative nameserver on the website's side.

How do I fix slow DNS? Switch to Cloudflare 1.1.1.1 or Google 8.8.8.8, flush your DNS cache, and disable conflicting VPN/antivirus DNS. That fixes most cases.

How do I flush my DNS cache? Windows: ipconfig /flushdns. macOS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. Linux: sudo resolvectl flush-caches.

What is the fastest DNS server? Cloudflare (1.1.1.1) and Google (8.8.8.8) are consistently among the fastest globally because they run large anycast networks. Test from your location with dig to be sure.

Does changing DNS actually make browsing faster? It speeds up the lookup step, which precedes every page load. It won't increase your raw bandwidth, but it removes a per-request delay that makes browsing feel slow.

Related Reading

Most "slow internet" complaints are really slow DNS. Work through these six fixes top to bottom and you'll either solve it in minutes or know exactly which hop to escalate.