Use this when Windows DNS resolution fails.
DNS Troubleshooting
Troubleshoot Windows DNS with Resolve-DnsName or nslookup against specific servers, ipconfig /all for configured servers and suffixes, ipconfig /flushdns, the hosts file and the DNS Client event log.
1. Resolve-DnsName <name> — error type (timeout, NXDOMAIN, wrong answer)?
2. Query the server directly with -Server.
3. Timeout → Test-NetConnection <dns> -Port 53.
4. Wrong answer → hosts, cache, stale record.
5. Check suffixes and NRPT.
client → cache/hosts → server → authoritative
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Known-good, broken and when it is fixed Verify boundary
Known-good means the client queries the intended resolver/policy path, receives the expected authoritative record set within valid TTL and the application successfully reaches the resolved service. Broken evidence is timeout, wrong resolver selection, stale/negative cache, suffix misresolution or unexpected answer. The limit of what it shows is that Resolve-DnsName/lookup success shows resolution, not endpoint service health; repeat the original application request.
Step 2 Common mistakes Narrow the fault
- Not flushing the cache after DNS changes.
Step 3 Native failure isolation and next-check logic Narrow the fault
If a name fails, query the exact FQDN and required record type against the effective configured resolver, then compare another resolver only to isolate authority/path—not as a permanent workaround. If the answer is wrong or stale, inspect client cache, suffix/NRPT and authoritative chain; if DNS answers correctly but the application fails, leave DNS and test connection to the returned endpoint. For domain/service discovery, inspect the relevant SRV records rather than only A/AAAA.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Test against a specific server to separate client and server problems.
- Check the hosts file for overrides.
- Flush the cache after fixing records.
Resolve-DnsName <name>— resolve via the Windows resolverGet-DnsClientServerAddress— DNS servers per interfaceGet-DnsClientCache— resolver cacheGet-DnsClientGlobalSetting— suffix search listClear-DnsClientCache— flush the cache
ReferenceHow it works1 section · depth on demand
How it works
The Windows DNS client combines per-interface DNS server lists, suffix/search behavior, NRPT/policy, cache and application resolver calls. VPNs or domain policy can change which server answers a name, and cached positive/negative responses can outlive a transient dependency failure. Name resolution success does not show the returned address is correct for the application's site/service, so query name, record type, server and answer TTL/source matter.
ReferenceImportant terms & boundaries1 section · depth on demand
Method
Windows DNS troubleshooting:
Resolve-DnsName app.corp.example.com -Server 10.0.0.53 -DnsOnly
Resolve-DnsName app.corp.example.com -Type A -NoHostsFile
nslookup -debug app.corp.example.com 10.0.0.53
Clear-DnsClientCache
Get-DnsClientNrptPolicy # name resolution policy (DirectAccess, VPN)
| Symptom | Check |
|---|---|
| Name resolves wrong | Hosts file, cache, NRPT, split-DNS, wrong server order |
| Short names fail | Suffix search list |
| Slow resolution | Unreachable first DNS server (timeouts before fallback) |
| Works with nslookup, not apps | nslookup bypasses cache/hosts/NRPT — use Resolve-DnsName |
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in DNS Client → DNS Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/networking/dns/dns-client-settings · confidence 94%