How to Fix Slow DNS Lookup: 8 Fixes That Work
Every time you open a website, your device first asks a DNS resolver to turn the name into an IP address. When that step is slow, every page feels sluggish even if your connection is fast, and your browser sits on “Resolving host” or “Looking up…” before anything loads. The good news is that it is usually easy to fix.
First, measure it
A healthy lookup takes well under 50 milliseconds, and a cached one is nearly instant. To see yours:
- Command line. Run
nslookup example.comor, on macOS and Linux,dig example.comand read the “Query time”. - Browser. Open developer tools, go to the Network tab, click a request and check the “DNS Lookup” timing.
- Online. Run our DNS lookup on a domain and compare the Cloudflare and Google resolvers.
If lookups routinely take hundreds of milliseconds, or time out, work through the fixes below.
1. Switch to a faster DNS resolver
By default you use your internet provider's resolver, which can be slow or overloaded. Public resolvers such as Cloudflare (1.1.1.1), Google (8.8.8.8) and Quad9 (9.9.9.9) are usually quicker. Change it on your router to speed up every device, or in your device's network settings for just one.
2. Flush the DNS cache
A corrupted or stale cache can cause delays and failures.
- Windows:
ipconfig /flushdns - macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Linux (systemd):
resolvectl flush-caches
3. Restart your router and modem
Home routers run a small DNS forwarder that can get stuck. Power-cycling the router is a quick way to clear it.
4. Turn on DNS over HTTPS in your browser
Chrome, Firefox, Edge and Safari can send lookups over an encrypted connection to a resolver you choose. This bypasses a slow or interfering network resolver, and it also stops others on the network from seeing which sites you look up.
5. Check for IPv6 problems
Browsers ask for both an IPv4 (A) record and an IPv6 (AAAA) record. If your network advertises IPv6 but cannot actually use it, lookups and connections can stall before falling back. Test by temporarily disabling IPv6 on your adapter. If things speed up, the fault is your IPv6 setup. Read IPv4 vs IPv6 for the background.
6. Test without your VPN, antivirus or filter
VPN apps, security suites and parental-control filters often intercept DNS. Pause them briefly and test again. If the delay disappears, change their DNS settings or choose a different server.
7. Look for local misconfiguration
An old entry in your hosts file, a dead secondary DNS server listed in your network settings, or an unreachable search domain can each add seconds. Remove any DNS server that you do not recognize or that no longer responds.
8. If it is only one website
When just one site is slow, the problem may be the site's own nameservers. Look up its NS records with our DNS tool and see how fast they answer. If you run the site, use a reputable DNS provider with servers around the world, and keep TTL values sensible. See DNS records explained.
Still slow?
Run our speed test to check latency and jitter. A high round-trip time points to a connection problem, not DNS.
Try it yourself
See the real numbers for your own connection with our free tools.