DNS Recursive Resolver Timeout Fix
DNS recursive resolver timeouts happen when your DNS server fails to answer in time. The fix is to check and optimize resolver settings or switch to a faster upstream.
Quick answer
If your DNS resolver times out, the root cause is usually a slow or dead upstream resolver, not your local machine. Run nslookup google.com 8.8.8.8 — if that works, your default DNS server is the problem. Change it to 1.1.1.1 or 8.8.8.8 in your network settings.
What's actually happening here
DNS recursive resolver timeout means your machine sent a query to your configured DNS server, waited the default timeout (usually 5-15 seconds on Windows, 5 seconds on Linux), and got nothing back. The error shows up when you try to browse the web, ping a domain, or run nslookup. It's common on misconfigured corporate networks, public Wi-Fi with captive portals, or home routers that can't reach their upstream ISP DNS after a modem reboot. I've seen this most often on Windows 10 machines using the default ISP-provided DNS after the ISP had a routing hiccup.
The reason step 3 works is simple: your local resolver (the stub resolver in Windows or glibc on Linux) is talking to the recursive resolver — that's the server doing the real work. If that recursive resolver is slow or down, the query times out. You can't fix it by changing settings on your machine unless you point to a different recursive resolver entirely.
Fix steps
- Test with a known-good resolver
Open a command prompt or terminal and run:
If you get a response, your current DNS server is the problem. If it also times out, you have a network-level issue — check your internet connection, firewall, or proxy.nslookup google.com 8.8.8.8 - Check your current DNS config
Windows:ipconfig /all | findstr "DNS Servers"
Linux:cat /etc/resolv.conforresolvectl status(systemd-resolved).
If you see an IP like 192.168.1.1, that's your router. That router might have a bad upstream. - Flush the local DNS cache
Sometimes a stale cache entry hangs the query. Windows:ipconfig /flushdns. Linux systemd:resolvectl flush-caches. Dnsmasq:sudo systemctl restart dnsmasq. - Change your DNS server
Switch to Cloudflare's 1.1.1.1 or Google's 8.8.8.8. On Windows, go to Network & Internet > Change adapter options > right-click your adapter > Properties > Internet Protocol Version 4 (TCP/IPv4) > Properties > Use the following DNS server addresses. On Linux, edit/etc/resolv.conf(if not managed by systemd-resolved) and addnameserver 1.1.1.1on top. For systemd-resolved, runresolvectl dns eth0 1.1.1.1(replace eth0 with your interface). - Increase the resolver timeout — last resort
If you must use a slow resolver (e.g., a corporate DNS with security filters), you can increase the timeout. On Windows, this is in the registry:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNSCache\Parameters. Add a DWORDQueryTimeOutand set it to a decimal value of 10 (seconds). Reboot or restart the DNS Client service. On Linux with glibc, edit/etc/resolv.confand addoptions timeout:10andoptions attempts:3. This gives you 30 seconds total before failure. Ugly, but it works if you're stuck.
Alternative fixes if the main one fails
If changing DNS servers didn't help, try these:
- Disable IPv6 temporarily — some resolvers get confused with AAAA queries. On Windows, uncheck Internet Protocol Version 6 in adapter properties. On Linux, add
net.ipv6.conf.all.disable_ipv6 = 1to/etc/sysctl.confand runsysctl -p. - Check for VPN interference — VPNs often override DNS settings. Disconnect from the VPN, test DNS resolution, then reconnect. If the timeout goes away, configure the VPN to use a different DNS server.
- Restart the DNS Client service on Windows —
net stop dnscache && net start dnscache. This clears any hung resolver threads. - Use a local caching resolver like Unbound or Dnsmasq. This bypasses the system resolver entirely. On Linux, install Unbound (
sudo apt install unbound), configure it to forward to 1.1.1.1, and point your system DNS to 127.0.0.1.
Prevention tip
Don't rely on your ISP's DNS server — they're often overloaded and poorly maintained. Set your router's DNS to 1.1.1.1 or 8.8.8.8 at the DHCP level. That way every device on your network uses a fast resolver. If you run a server or development machine, install a local recursive resolver like Unbound that caches results. It'll reduce outside dependency and speed up repeated lookups. Also, if you're on a corporate network, talk to your IT department — a timeout every 15 minutes suggests their DNS infrastructure is failing. Don't accept it.
Was this solution helpful?