Use this when a Windows client uses wrong DNS servers.
DNS Servers
DNS servers on a Windows interface are the resolvers it queries, in order. Set them with Set-DnsClientServerAddress or netsh; domain members should point only at internal DNS servers that know AD.
1. Get-DnsClientServerAddress — per interface.
2. Domain members → only internal DNS servers.
3. Set: Set-DnsClientServerAddress -InterfaceAlias <if> -ServerAddresses a,b.
4. Test: Resolve-DnsName <name> -Server <dns>.
5. ipconfig /flushdns.
interface DNS servers → resolver queries in order
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 Common mistakes Narrow the fault
- Public DNS servers on domain members.
- Only one DNS server configured.
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.
Get-NetIPConfiguration— addresses, gateway and DNS per interfaceGet-NetAdapter— adapters, status and link speedGet-NetRoute -AddressFamily IPv4— routes and metricsTest-NetConnection <host> -Port <p>— ping, route and TCP port testipconfig /all— full IP configurationGet-NetIPInterface | Select InterfaceAlias,AddressFamily,Dhcp,InterfaceMetric— DHCP state and metric per interface
ReferenceWhy it matters1 section · depth on demand
How it works
The DNS client sends queries to the first server in the interface's list and moves to the next only if there is no response (timeout), not if it gets a negative answer (NXDOMAIN). Servers come from DHCP (option 6) or static configuration, per interface. On a domain member every listed server must be able to resolve the AD zone, because any of them may be used.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
The documented timeout sequence
Microsoft documents that the Windows DNS client sends queries at 0, 1, 2, 4 and 8 seconds and gives up at 10 seconds; what changes with more servers is which server each attempt goes to:
| Time (s) | 1 server | 2 servers | 3+ servers |
|---|---|---|---|
| 0 | DNS1 | DNS1 | DNS1 |
| 1 | DNS1 | DNS2 | DNS2 |
| 2 | DNS1 | DNS2 | DNS3 |
| 4 | DNS1 | all | all |
| 8 | DNS1 | all | all |
| 10 | stop | stop | stop |
A Name Error (NXDOMAIN) from any server ends the process; the client only moves on when servers do not answer. A fourth server in the list is not queried until at least 4 seconds have passed — applications with shorter timeouts never reach it.
Consequences for configuration
- Order matters: put the closest, most reliable resolver first.
- Mixing internal and public resolvers is a bug, not redundancy: if the public server answers NXDOMAIN for an internal name, the client accepts it.
- More than two or three servers adds little; it mostly lengthens failure time.
Inspect and set
PS C:\> Get-DnsClientServerAddress -AddressFamily IPv4 | Where ServerAddresses
InterfaceAlias Interface Address ServerAddresses
Index Family
-------------- --------- ------- ---------------
Ethernet 12 IPv4 {10.0.0.53, 10.0.0.54}
PS C:\> Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 10.0.0.53,10.0.0.54
PS C:\> Resolve-DnsName dc01.corp.example.com -Server 10.0.0.54 -DnsOnly
Which adapter's servers are used
With several active adapters (VPN, Wi-Fi, virtual switches), Windows sends the query to the servers of the interface it prefers by metric, and the Name Resolution Policy Table (NRPT, Get-DnsClientNrptPolicy) can route specific namespaces to specific servers. A VPN that "breaks internal names" usually has a different interface metric or NRPT rule than expected.
Domain controllers
A DC should point to another DC first and itself second (or loopback), never to public DNS; members should only list AD-integrated DNS servers.
*The DNS server address configuration above are illustrative examples, not captured from a lab or production system.*
Platform, version and operating-envelope scope
Windows DNS Client and Windows Server DNS where applicable; NRPT, DoH and interface behavior vary by release/policy.
Commands
Get-DnsClientServerAddress -AddressFamily IPv4
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 10.0.0.53,10.0.0.54
Resolve-DnsName dc01.corp.local -Server 10.0.0.53
Documented example, not captured output.
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 IP Configuration → DNS Servers. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/networking/ · confidence 94%