Playbook
Troubleshooting Slow DNS Lookups
A slow lookup feels like a slow website, but the delay can sit in half a dozen places between your device and the domain's nameservers. Timing the same query at each step shows which one is slow, and whether DNS is the problem at all.
The short answer
Time one query at each layer and compare. Ask your normal resolver, then a public resolver, then the domain's authoritative servers directly, twice each. If every answer is fast, DNS is not your problem. If only your normal resolver is slow, the cause is on your network: the router, a VPN, a security filter or an unreachable resolver in your settings. If the authoritative servers are slow or one of them does not answer, every uncached lookup for that domain is slow for everyone, and the fix is at the DNS provider.
Where the time goes
| Layer | Typical cause of delay |
|---|---|
| Application or browser | Several lookups in sequence, such as A and AAAA, or names on many third-party domains |
| Operating system | Search suffixes that turn one lookup into several, or a first resolver in the list that does not answer and must time out |
| Router or local resolver | An overloaded home router, or a resolver forwarding to a slow upstream |
| VPN or security software | All lookups sent through a tunnel to a distant resolver, or inspected before being answered |
| Recursive resolver | Cache misses on a busy or distant resolver, or DNSSEC validation with large answers that fall back to TCP |
| Authoritative servers | A listed nameserver that is down or lame, servers far from the resolver, or a long CNAME chain across providers |
Step 1: is it DNS at all?
Split a page load into its parts before blaming DNS. curl reports each phase separately.
| Command | What it shows |
|---|---|
| curl -o /dev/null -s -w "dns %{time_namelookup} connect %{time_connect} tls %{time_appconnect} total %{time_total}\n" https://www.example.com/ | Seconds from the start of the request until the lookup, the TCP connection, the TLS handshake and the whole request had each finished. The numbers are cumulative: the lookup took dns, the TCP connection took connect minus dns, and the TLS handshake took tls minus connect. On Windows use curl.exe and -o NUL. |
| Measure-Command { Resolve-DnsName www.example.com -DnsOnly } | How long a Windows lookup takes, in PowerShell |
If the lookup takes a few milliseconds and the connection or TLS step (the difference between its number and the one before it) takes seconds, look at the network path or the server instead. Ping, latency, packet loss and jitter is a good next step.
Step 2: time the same query against each resolver
dig prints a Query time line for every query. Run each command twice: the first answer may be a cache miss, the second should come from the resolver's cache.
| Command | What it tells you |
|---|---|
| dig www.example.com | Your configured resolver (often the router) |
| dig @1.1.1.1 www.example.com | Cloudflare's public resolver |
| dig @8.8.8.8 www.example.com | Google Public DNS |
| dig @9.9.9.9 www.example.com | Quad9 |
| Resolve-DnsName www.example.com -Server 1.1.1.1 -DnsOnly | The same test on Windows, wrapped in Measure-Command |
| resolvectl status, Get-DnsClientServerAddress or scutil --dns | Which resolvers your Linux, Windows or Mac machine is actually using, in order |
Reading the results:
- Your resolver is slow on both runs, public ones are fast: the router, VPN or local resolver is the problem. Restart the router, test with the VPN off, or change resolvers.
- Every resolver is slow the first time and fast the second: uncached lookups for this domain are slow, so look at its authoritative servers (step 3).
- Some lookups take almost exactly 1, 2 or 5 seconds: something is timing out and retrying. Usually a resolver in your list that does not answer, a dropped IPv6 or TCP path, or a dead authoritative server.
- Everything is fast with dig but slow in the browser: the browser may be using its own DNS over HTTPS provider, or the system is adding search suffixes. Try the name with a trailing dot, which stops the system adding suffixes.
Step 3: time the authoritative servers
| Command | What to look for |
|---|---|
| dig +short example.com NS | The list of nameservers to test |
| dig +norecurse @ns1.example.com www.example.com | Query time and the aa flag from each nameserver in turn. A timeout here slows down every resolver that picks this server. |
| dig +trace www.example.com | The time for each referral from the root down, and any CNAME that sends the lookup to another provider |
| dig +norecurse +tcp @ns1.example.com www.example.com | Whether the server answers over TCP, which large or signed answers need |
Resolvers learn to avoid slow nameservers, but each uncached lookup can still pay for a timeout first. Remove or fix nameservers that do not answer, and keep CNAME chains short. See EDNS and TCP fallback if answers only fail when they are large.
Common fixes
- Remove dead resolvers from DHCP, VPN profiles and static settings. Clients wait for the first one to time out before trying the next.
- Trim search suffixes and, in Kubernetes, lower ndots or use fully qualified names for external services.
- Fix or replace a struggling router resolver, or point clients straight at a nearby resolver.
- Use split DNS on VPNs so that only internal names go through the tunnel. See split-brain DNS.
- On the authoritative side, remove lame nameservers, use providers with anycast networks near your users, and avoid TTLs so short that most lookups miss the cache.
- Check IPv6. A broken IPv6 path to a resolver or nameserver adds a timeout before IPv4 is tried.
What remote checks cannot measure
DNS Panopticon runs its checks from Cloudflare's network and from Globalping probes, not from your computer. It cannot see your router, your VPN, your search suffixes or your local security software, and the response times it sees are not the ones your users see. Use the timed commands above from an affected device for that. What it can show is the remote half: Security Posture flags nameservers that do not answer for the zone, Ping measures latency to a nameserver from probes around the world, and the TCP Port Check confirms that port 53 accepts TCP connections.
FAQ
What is a normal DNS lookup time?
An answer from a resolver's cache usually takes a few milliseconds on a local network and under about 50 milliseconds from a public resolver. An uncached lookup that has to walk the delegation chain can take a few hundred milliseconds.
Will switching to a public resolver make browsing faster?
Sometimes. If your router or ISP resolver is slow or overloaded, yes. If it is already fast, a public resolver further away can be slower, and some content networks pick servers based on where the resolver is.
Why are lookups slow only on the VPN?
Most VPNs send every lookup through the tunnel to a resolver on the company network. Split DNS, which sends only internal names through the tunnel, usually fixes it.
Can a slow authoritative server affect everyone?
Yes. Every resolver that does not have the answer cached has to ask the authoritative servers, so a slow or dead nameserver adds delay for all users until the answer is cached.