Enable DNS over HTTPS (DoH) on Windows
Encrypt your DNS lookups with a DoH server so your ISP cannot easily see which sites you visit.
01Command
$ Add-DnsClientDohServerAddress -ServerAddress "1.1.1.1" -DohTemplate "https://cloudflare-dns.com/dns-query" -AllowFallbackToUdp $false -AutoUpgrade $true
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses 1.1.1.1,1.0.0.102What it does
By default Windows sends DNS queries in plain text, so the network operator can log every domain you resolve. Add-DnsClientDohServerAddress registers a known DoH template, and with AllowFallbackToUdp set to $false the lookup is refused rather than sent unencrypted if DoH fails. The second line makes Windows actually use those servers on your Wi-Fi adapter.
03Risk
04Undo
$ Remove-DnsClientDohServerAddress -ServerAddress "1.1.1.1"05Sources
- ipconfig - Windows CMDEvidence: Covers ipconfig usage for viewing and renewing DNS settings that must point at the DoH-capable server address.
- Add-DnsClientDohServerAddressEvidence: Documents the cmdlet parameters: ServerAddress, DohTemplate, AllowFallbackToUdp and AutoUpgrade for configuring DNS-over-HTTPS on a client.
Last verified: 2026-09-18 · Category: Network
06Related solutions
The modern, scriptable replacement for nslookup: ask for exact record types, hit specific DNS servers, and see TTLs as objects.
Purge cached DNS lookups so Windows re-resolves hostnames from scratch — the fix for 'the new server is live but my browser still hits the old one'.
Search inside text files and logs with regex, returning file, line number and match.