DNS query timeout: no response received
ID: networking/dns-timeout
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
The DNS resolver did not receive a response within the timeout period. This can be caused by an unreachable DNS server, firewall blocking UDP port 53, network connectivity issues, or an overloaded DNS server.
genericWorkarounds
-
88% success Diagnose and fix DNS server connectivity
1. Test current DNS server: dig @$(grep nameserver /etc/resolv.conf | head -1 | awk '{print $2}') google.com 2. Test alternate DNS: dig @8.8.8.8 google.com 3. Check if UDP 53 is blocked: nmap -sU -p 53 8.8.8.8 4. Check network route: traceroute -U -p 53 8.8.8.8 5. If firewall is blocking, add rule: iptables -A OUTPUT -p udp --dport 53 -j ACCEPT 6. Switch to working DNS: echo 'nameserver 8.8.8.8' > /etc/resolv.conf -
82% success Switch to DNS-over-HTTPS or DNS-over-TLS to bypass UDP blocking
1. Install a DoH/DoT client such as stubby or cloudflared 2. For systemd-resolved, enable DNS-over-TLS: set DNSOverTLS=yes in /etc/systemd/resolved.conf 3. Set DNS servers that support DoT: DNS=1.1.1.1#cloudflare-dns.com 8.8.8.8#dns.google 4. Restart resolved: systemctl restart systemd-resolved 5. Verify: resolvectl query google.com
Dead Ends
Common approaches that don't work:
-
Increase the DNS timeout value indefinitely
80% fail
If the DNS server is unreachable or blocked by a firewall, no amount of waiting will produce a response. Increasing timeouts just delays the inevitable failure and makes applications appear to hang, degrading user experience without solving the root cause.
-
Add the hostname to /etc/hosts as a permanent workaround
75% fail
Static host entries bypass DNS but only work for the specific hostnames listed. IPs change, new services appear, and maintaining /etc/hosts does not scale. It also breaks if the IP address changes due to load balancing, failover, or infrastructure updates.