Home › Topics › It's Always DNS: Name Resolution Health › DNS Troubleshooting Playbook

A DNS Troubleshooting Playbook: From Symptom to Root Cause


A user can't reach the app. Or the app can't reach its database. Or "the internet is broken," which could mean anything from a dead resolver to an unplugged docking station. You suspect DNS — you have read the meme, you know the odds — but suspicion isn't a diagnosis. Restarting things at random until the symptom goes away teaches you nothing except how to have the same outage twice.


This is a playbook: a fixed sequence of five steps. It starts at the complaining client and walks outward through the resolution chain. That means cache, configured resolver, alternative resolver, and finally the authoritative servers that own the answer. Each step uses one or two commands. Each command's output is shown and decoded. Each outcome tells you exactly which link of the chain to blame before you touch a single config. If the chain itself is fuzzy in your head, skim Why It's Always DNS first. This article assumes that map and drives it like a rally course.


One rule before we start: don't skip steps. Every step exists because skipping it once cost somebody an afternoon. The whole sequence takes under ten minutes, and the discipline is the point. The steps don't just find the fault. They rule out everything the fault isn't.


In this guide

  • The tools: nslookup and dig in thirty seconds
  • Step 1: Reproduce with a name AND an IP
  • Step 2: Query the configured resolver directly
  • Step 3: Query an alternative resolver
  • Step 4: Check the client cache (and the hosts file)
  • Step 5: Walk toward authoritative
  • Reading the responses: NXDOMAIN, SERVFAIL, timeout, and friends
  • Split-horizon and internal-zone gotchas
  • The playbook on one page

The tools: nslookup and dig in thirty seconds


Two commands do everything in this playbook. nslookup ships with Windows, so it is always there on the machine that's complaining. dig is the standard on Linux and macOS, installable on Windows, and gives more detail in a more readable form. Use it wherever you have it. Both take the same two ideas: a name to look up, and optionally a specific server to ask.


nslookup www.example.com                  ask the default resolver
nslookup www.example.com 10.10.8.22       ask a SPECIFIC server

dig www.example.com                       ask the default resolver
dig @10.10.8.22 www.example.com A         ask a specific server for A records
dig @10.10.8.22 www.example.com +short    just the answer, please

The "ask a specific server" form is the whole game. Normal applications take whatever the operating system's resolution path gives them; you, the troubleshooter, get to interrogate each link of the chain individually. That difference is what turns a shrug into a diagnosis. (An A record, for the record, is the type that maps a name to an IPv4 address. It is the kind of lookup behind nearly every "can't reach it" ticket.) PowerShell users get a third option, Resolve-DnsName name -Server 10.10.8.22, which does the same job with tidier output. Use whichever is under your fingers, because the playbook cares about the questions, not the tool.


Step 1: Reproduce with a name AND an IP


First, split the problem in half. Whatever the symptom — site unreachable, app timing out — try to reach the destination by its name, then by its IP address. This one comparison separates "we can't find the server" (DNS) from "we can't reach the server" (network), and those are entirely different investigations:


C:\> ping app.corp.example
Ping request could not find host app.corp.example.
Please check the name and try again.

C:\> ping 10.20.4.40
Reply from 10.20.4.40: bytes=32 time=1ms TTL=63

Read it as a two-by-two. Name fails, IP works — as above — and DNS is implicated: continue with this playbook. Both fail — the problem is connectivity or the destination itself, and DNS is (this time) innocent. The companion guide on proving it isn't DNS covers documenting that exoneration. Name works but the app still fails — resolution is fine and the trouble lives higher up, in the service or its port. And if both work while the user's app still can't connect, you have learned the third useful thing. In that case, the problem is specific to that application, not to the plumbing.


Two honest caveats. Pinging an IP proves reachability, not that the service works. And some hosts block ping entirely, so a failed ping to a working server is possible. When in doubt, test the actual port. And browsing to a website by raw IP often fails even when everything is healthy. Web servers routinely host many sites on one address and need the name to pick the right one. Use the IP test to check reachability, never as proof the website itself is fine.


Step 2: Query the configured resolver directly


Next, find out which resolver the complaining machine actually uses, and ask that server the failing question directly. On Windows, ipconfig /all lists the configured servers — look for the DNS Servers lines on the active adapter:


   DNS Servers . . . . . . . . . . . : 10.10.8.21
                                       10.10.8.22

C:\> nslookup app.corp.example 10.10.8.21
Server:  UnKnown
Address:  10.10.8.21

*** UnKnown can't find app.corp.example: Server failed

Decode time. Server failed is nslookup's wording for a SERVFAIL response. The resolver heard the question and admits it could not complete the job. That is not the same as "the name doesn't exist," and the distinction drives everything later (there's a whole section on it below). The UnKnown server name, meanwhile, only means nslookup couldn't reverse-resolve the server's IP into a name for display. It looks alarming and means nearly nothing; ignore it and read the verdict on the last line.


Why ask the resolver directly when the user's browser already failed? Because the browser's failure passed through the stub, the client cache, timeouts, and retries — layers of fog. A direct query gives you the resolver's own answer, right now, with none of the machinery in between. You have just tested link three of the chain in isolation. You have either confirmed the server misbehaves or cleared it and pushed suspicion back toward the client.


Step 3: Query an alternative resolver


Now ask the other resolver — the second entry from ipconfig /all — the same question:


C:\> nslookup app.corp.example 10.10.8.22
Server:  UnKnown
Address:  10.10.8.22

Name:    app.corp.example
Address: 10.20.4.40

Interesting! The twin answers perfectly. One resolver failing while its partner succeeds localizes the fault to that specific server — its service, its zone copy, or its forwarding path. This also explains any intermittent behavior users reported, since clients silently lean on whichever server responds. You now know which box to log into, and the fix is a server conversation, not a network hunt.


For external names, add one more comparison: ask a public resolver you don't operate. If your internal servers fail an external name that a public resolver answers fine, your resolvers (or their forwarders) are the problem, not the destination. One giant caution before you internalize that trick: it applies to external names only. Internal names live solely on internal servers, and a public resolver will confidently report they don't exist — a misleading "clue" that has derailed many an investigation. The gotcha section below explains why.


Tip: whatever tool you use, always note which server answered before trusting the result. nslookup's Server: header and dig's trailing SERVER: line exist for a reason. "I looked it up and it was fine" is meaningless without knowing who you asked. Different links of the chain hold different truths.


Step 4: Check the client cache (and the hosts file)


Suppose instead that both resolvers answer correctly, yet the client still fails. Suspicion falls back on the machine itself — specifically its cache. The cache may be serving a remembered wrong answer, or a remembered "does not exist" (negative caching — yes, failure gets cached too). Inspect and clear:


C:\> ipconfig /displaydns          show what the OS has cached
C:\> ipconfig /flushdns            throw it all away

PS C:\> Get-DnsClientCache -Name app.corp.example    the PowerShell view

While you're this close, check the hosts file (C:\Windows\System32\drivers\etc\hosts) — a manual override that beats DNS entirely. Finding a forgotten test entry from some project is a rite of passage. The machine wasn't resolving wrong. It was obediently following a note somebody left behind. Browsers keep their own small DNS caches on top of the OS one, so a browser restart belongs in this step's toolkit as well.


The cache step is also where "works for me, broken for them" mysteries die. Two machines asking the same resolvers but holding different cached answers will disagree until the stale entry expires. So compare displaydns output on a working and a failing machine before declaring anything haunted.


Step 5: Walk toward authoritative


Sometimes every resolver you ask gives the same disappointing answer. Then the question becomes: is the answer itself wrong at the source, or is everyone mis-relaying it? To find out, go to the source — the authoritative servers that own the zone. First learn who they are by asking for the zone's NS (name server) records, then query one directly:


$ dig corp.example NS +short
dc1.corp.example.
dc2.corp.example.

$ dig @dc1.corp.example app.corp.example +noall +answer
app.corp.example.   3600   IN   A   10.20.4.40

If the authoritative answer is correct but resolvers relay something else, you are looking at stale caches or a broken forwarding layer between them. In that case, wait out the TTL or flush the resolver's cache, and check what the resolver forwards to. If the authoritative answer is itself wrong or missing, stop hunting. In that case, the record is wrong at the source, and the fix is editing the zone, not restarting services. For external names, dig www.example.com +trace performs the entire delegation walk from the root servers down to the authoritative answer, from your desk. It bypasses every local resolver — the definitive second opinion when you suspect your whole chain of lying.


On your own DNS servers, the equivalent of this step is checking the forwarder configuration. What does this server do with questions it can't answer itself, and is that target reachable and sane? A resolver is only as good as whatever it forwards to.


One authoritative-side gotcha specific to Active Directory environments deserves a mention: scavenging. AD DNS lets clients register their own records dynamically, and scavenging is the cleanup job that deletes dynamic records that stopped refreshing. When it is tuned too aggressively — or a machine stops refreshing for an innocent reason — a perfectly good server's record silently vanishes from the zone. In that case, every resolver truthfully reports NXDOMAIN. If a record that "was definitely there" is now missing, ask whether it was static or dynamic before assuming a human deleted it. The fix (and the prevention) is different for each.


Reading the responses: NXDOMAIN, SERVFAIL, timeout, and friends


Every step above produces one of a handful of outcomes, and each outcome points somewhere different. This table is the decoder ring; it is worth genuinely memorizing the first three rows:


ResponseWhat it meansWhat it implicates
NXDOMAIN ("can't find: Non-existent domain")A definite, authoritative "this name does not exist"The record really is missing; you asked a resolver that can't see the zone (split-horizon); a typo or search-suffix mangling; or a cached negative answer outliving a just-created record
SERVFAIL ("Server failed")"I tried to get the answer and could not"The resolver's forwarder or upstream is broken or unreachable; the zone's authoritative servers are all down; or the zone itself failed to load or validate
Timeout (no response at all)Nothing came back, not even an errorThe server is down or the wrong IP; UDP port 53 blocked by a firewall; or the network path to the resolver is broken
NOERROR, but zero answers"The name exists, but has no record of the type you asked for"Asking for the wrong type (an A query for a name that only has MX, say) — usually the query is the bug, not the zone
REFUSED"I heard you, and I decline"Server policy: you're outside its allowed networks, or recursion is disabled for you — an access question, not a data one

The crucial contrast is the first two. NXDOMAIN is a confident answer — the machinery worked and reported an absence. SERVFAIL is an admission of defeat — the machinery itself broke. An NXDOMAIN investigation goes hunting for why the record isn't visible (wrong zone, wrong resolver, negative cache). A SERVFAIL investigation goes hunting for the broken machinery (forwarders, upstreams, zone loading). A timeout isn't a DNS answer at all — it's a network answer. Your next tool is a reachability check on port 53, not another lookup.


A last wrinkle for the strange cases: DNS normally rides UDP, but large answers and zone transfers fall back to TCP on the same port. A firewall that permits UDP 53 while quietly blocking TCP 53 produces the weirdest symptom in this article. Most lookups are fine, but a specific few fail or are truncated, forever. If exactly one name keeps misbehaving through a firewall while everything else resolves, test port 53 over TCP before questioning your sanity.


Split-horizon and internal-zone gotchas


Split-horizon DNS means the same name space answers differently depending on where you ask from. Most organizations run it whether they call it that or not. Internal zones like corp.example exist only on internal servers. And some public names get an internal override pointing at a private address. Split-horizon DNS is useful, normal — and a reliable generator of troubleshooting traps:


  • Public resolvers honestly can't see internal zones. An NXDOMAIN for app.corp.example from a public resolver is not evidence of a problem — it is the expected result. Only compare resolvers that are supposed to know the answer.
  • VPN clients live or die by resolver assignment. A remote machine whose VPN fails to hand it internal resolvers will reach internal IPs fine yet resolve no internal names — "connected but nothing works." Check which resolvers the VPN adapter actually got before blaming the tunnel.
  • Short names lie about where the problem is. Typing app works in the office because the client silently appends a search suffix to form app.corp.example. The same short name fails wherever the suffix list differs. Always test with the FQDN — the fully qualified name, every label spelled out — so you and the user are provably asking the same question.
  • Internal overrides go stale independently. When a public site moves and someone forgot your internal override copy, only your users break, and only on the corporate network. "Broken here, fine on my phone" for one specific site should send you looking for a forgotten override zone.

If your environment's layout of internal zones, forwarders, and overrides is undocumented folklore, troubleshooting will keep costing double. The case for drawing it out lives in Resolvers, Forwarders, and Caches.


The playbook on one page


The condensed version, suitable for taping to a monitor:


  • 1. Name vs IP. Reach the target both ways. Name fails + IP works = DNS; both fail = network; both work = the app.
  • 2. Ask the configured resolver directly. nslookup FQDN <resolver-ip> for each server the client uses. Note the exact response, not just "failed."
  • 3. Ask an alternative. The twin resolver; for external names, also a public one. Different answers = the differing server is your lead.
  • 4. Check the client. ipconfig /displaydns, /flushdns, the hosts file, the browser. "Works for me" usually dies here.
  • 5. Go authoritative. Find NS records, query the source directly, or dig +trace. Wrong at the source = fix the zone; right at the source = fix the relaying.
  • Then decode: NXDOMAIN = confident absence. SERVFAIL = broken machinery. Timeout = network, not DNS. And write down what you found while it's fresh.

Tip: paste the actual command output into the ticket as you go. Two minutes of copying beats reconstructing evidence from memory at the post-incident review. The next person to hit the same symptom inherits a worked example instead of a shrug.


Where to go next


Run this sequence a few times and something pleasant happens: the meme loses its power. DNS stops being the spooky force that "always" did it and becomes a chain of four testable links. Each has a command that makes it confess. The steps also compose. Monitoring can pre-answer half of them before you sit down. That is why the DNS health monitoring guide pairs so well with this one. Its per-resolver checks are steps 2 and 3, running every minute, forever.


And for the days when step 1 comes back "both fail" and DNS is off the hook, there is another guide. The guide Proving It Isn't DNS shows how to turn that innocence into evidence a ticket can carry. The full series lives at It's Always DNS: Name Resolution Health.


Put this into practice with SysPeep Monitor

Half of every troubleshooting session is finding out what changed and when. SysPeep Monitor watches your DNS servers alongside everything else. That includes reachability, Windows service health over WMI, and resource metrics over SNMP and SSH. It timestamps every state change on a live dashboard. So step one of the playbook often starts already answered. The free trial installs on a single Windows machine.

Download Free TrialLearn About SysPeep