DNS Not Resolving: 7 Fixes That Actually Work
Fix DNS not resolving errors fast. Compare local, server, and provider-side causes. Get a working checklist for immediate troubleshooting.

On this page
TL;DR — Key takeaways
- Check local cache first using 'ipconfig /flushdns' or 'sudo dscacheutil -flushcache' before blaming the provider.
- Use 'dig +trace' to identify exactly which authoritative server is failing or timing out.
- A 'SERVFAIL' status usually means the upstream resolver cannot reach the authoritative nameserver, not a local issue.
- TTL values determine how long old records persist; wait for the full TTL to expire before declaring propagation complete.
- Always verify NS records at the registrar level before debugging zone files on the hosting server.
When a site goes dark, the first instinct is to check the web server. But in my support queue, the culprit is rarely Apache or Nginx. It is DNS. The domain simply does not resolve to an IP address.
This guide compares the three main failure points: local client issues, recursive resolver problems, and authoritative server misconfigurations. We will look at how to isolate each layer using standard tools like dig and nslookup.
Local Client vs. Server-Side Failures
The first step is determining where the break occurs. If you can ping the IP address of your server but not the domain name, the issue is DNS. If you cannot ping the IP either, it is a network or firewall issue, not DNS.
Local failures are the most common. A user's computer caches DNS records to speed up browsing. If the record changed, the computer might still be using the old IP. This is not a server problem. It is a cache problem.
To test this, flush the DNS cache on the affected machine. On Windows, run 'ipconfig /flushdns'. On macOS, use 'sudo dscacheutil -flushcache'. On Linux, restart the systemd-resolved service or clear the nscd cache. If the site loads after flushing, the issue was local. No further server-side investigation is needed.
- Windows: ipconfig /flushdns
- macOS: sudo dscacheutil -flushcache
- Linux: sudo systemctl restart systemd-resolved
- Test with a different device to isolate the issue
Comparing Recursive Resolver Issues
If the local cache is clean but the site still does not load, the problem might be with the recursive resolver. This is the DNS server your ISP or network provides. It queries other servers to find the answer for you.
Some resolvers are stricter than others. They may reject responses that look suspicious or have configuration errors. This can cause a 'SERVFAIL' or 'NXDOMAIN' error even if the authoritative server is working fine.
To test this, switch to a public resolver like 8.8.8.8 or 1.1.1.1 temporarily. You can do this in your browser settings or via command line. If the site loads with the public resolver, your ISP's resolver is the bottleneck. Contact your ISP or switch to a different DNS provider for your network.
- Use 'dig @8.8.8.8 domain.com' to test against Google DNS
- Use 'dig @1.1.1.1 domain.com' to test against Cloudflare DNS
- Check if the error persists across multiple public resolvers
- If it works on public resolvers, the issue is your local ISP DNS
TTL and Propagation Delays
You changed the record, but it still does not work. This is usually a TTL issue. The Time To Live value tells resolvers how long to cache the record. If the TTL was high, old records persist for hours or days.
There is no way to force global propagation. You must wait for the TTL to expire. However, you can lower the TTL before making a change to reduce future downtime. Set it to 300 seconds (5 minutes) a day before a planned change, then raise it back to 3600 or 86400 after the change is confirmed.
To check the current TTL, use 'dig domain.com'. Look for the 'TTL' field in the output. This tells you how long the current record will remain cached. If it is 86400, you are waiting up to 24 hours for full propagation.
- Check current TTL with 'dig domain.com'
- Lower TTL to 300 seconds before making changes
- Wait for the full TTL to expire after a change
- Use 'dig +short domain.com' to see the current IP quickly
Firewall and Network Connectivity
The authoritative server is running, but resolvers cannot reach it. This is a network issue. DNS uses UDP port 53 for queries and TCP port 53 for zone transfers and large responses. If either is blocked, DNS fails.
Check your server's firewall. On Linux, use 'ufw status' or 'iptables -L'. Ensure UDP and TCP port 53 are allowed. On cloud providers, check the security group rules. A common mistake is allowing TCP but forgetting UDP.
Test connectivity with 'nc -zvu domain.com 53'. This checks if the UDP port is open. If it times out, the firewall is blocking the traffic. Open the port and test again. If it still fails, check for upstream network issues or provider outages.
- Allow UDP port 53 on the authoritative server
- Allow TCP port 53 for zone transfers and large responses
- Test with 'nc -zvu domain.com 53'
- Check cloud security groups if using AWS, GCP, or Azure
Practical Troubleshooting Workflow
Here is the step-by-step process I use in support tickets. Start with the simplest, most likely cause and work your way up. This saves time and avoids unnecessary server changes.
Step 1: Flush local DNS cache. Step 2: Test with a public resolver. Step 3: Check NS records at the registrar. Step 4: Verify firewall rules on the authoritative server. Step 5: Check authoritative server logs. Step 6: Wait for TTL expiration if all else is correct.
If you reach Step 6 and the issue persists, the problem is likely with the DNS provider's infrastructure. Contact their support with the dig output and timestamps. Do not change zone files blindly. A wrong edit can make things worse.
- Flush local cache first
- Test with public resolvers (8.8.8.8, 1.1.1.1)
- Verify NS records at the registrar
- Check firewall rules for port 53
- Review authoritative server logs
- Wait for TTL expiration if all checks pass
Quick troubleshooting checklist
- Flush local DNS cache on the affected machine.
- Run 'dig +trace domain.com' to isolate the failing nameserver.
- Verify NS records at the domain registrar match your hosting provider.
- Check authoritative nameserver logs for connection timeouts or refused packets.
- Confirm firewall rules allow UDP/TCP port 53 inbound traffic.
- Wait for TTL expiration if records were recently changed.
FAQ
Why does DNS not resolving happen only on one device?
This is almost always a local issue. The device has a stale cache, a misconfigured static DNS entry, or a network adapter problem. Flush the local cache and check the device's network settings before investigating the server.
How long does DNS propagation actually take?
It depends entirely on the TTL (Time To Live) value set on the record. If the TTL was 3600 seconds, propagation takes up to one hour. If it was 86400 seconds, it takes up to 24 hours. There is no global propagation timer; it is purely a cache expiration process.
What does a SERVFAIL status mean in dig output?
SERVFAIL means the recursive resolver (like 8.8.8.8) asked the authoritative nameserver for the record, but the authoritative server returned an error or did not respond. This points to a problem with the authoritative server's configuration, firewall, or network connectivity, not the client.
Related articles
- Hosting OperationsDNS Not Resolving: 5 Fixes That Actually WorkFix DNS not resolving errors by comparing five practical methods. Identify the root cause and apply the correct solution for your hosting setup.
- Hosting OperationsDNS Not Resolving Troubleshoot: 5 Fixes That WorkStop guessing. Compare 5 DNS not resolving troubleshoot methods to fix broken lookups fast. Clear steps for hosts and devs.
- Hosting OperationsWebsite Down Not Working: 7 Fixes That Actually WorkFix a website down not working error fast. Check DNS, server status, and code errors with these 7 practical steps for hosting owners.
- Hosting OperationsWebsite Down Not Working: 6 Fixes That Actually WorkFix website down not working errors by checking DNS, disk space, and PHP limits. This guide provides 6 practical steps to restore uptime fast.
- Hosting OperationsWebsite Down Not Working: 6 Fixes That Actually WorkFix a website down not working issue by comparing DNS, server, and code causes. Use this side-by-side guide to identify the root cause fast.
- Hosting OperationsWebsite Down Not Working: 7 Fixes That Actually WorkFix a website down not working error by checking DNS, disk space, and PHP limits. Stop downtime fast with these 7 practical hosting troubleshooting steps.