Windows 11
Windows 11 can send DNS over HTTPS without extra software. It needs two things for each server: an IP address to connect to, and the DoH URL (Windows calls it a template). The IP address only tells Windows where to connect. The path of the template selects your profile and device.
Before you start, get your profile id and choose a device name. The server addresses are the shared addresses of opdns:
- IPv4:
23.166.164.53and23.166.164.35. - IPv6, if your network has it:
2602:81f:6000::53and2602:81f:6000::35.
-
Open Settings → Network & internet, then Wi-Fi or Ethernet, and the connection that you use. For Wi-Fi, choose Hardware properties.
-
Next to DNS server assignment, click Edit and choose Manual.
-
Turn on IPv4. In Preferred DNS, enter
23.166.164.53. -
Set DNS over HTTPS to On (manual template) and enter:
https://dns.opdns.net/<profile-id>/<device> -
Set Fallback to plaintext to Off. If this setting is on and DoH fails, Windows uses unencrypted DNS and does not tell you. opdns cannot identify those queries.
-
In Alternate DNS, enter
23.166.164.35, with the same DNS over HTTPS setting and template. -
If you have IPv6, turn on IPv6. Do the same steps with
2602:81f:6000::53(preferred),2602:81f:6000::35(alternate) and the same template. -
Click Save, then check it works.
Do these steps for each network adapter that you use. Each adapter has its own setting.
Register the template one time for each address. Then point the adapter at the addresses:
foreach ($server in "23.166.164.53", "23.166.164.35", "2602:81f:6000::53", "2602:81f:6000::35") { netsh dns add encryption server=$server ` dohtemplate=https://dns.opdns.net/<profile-id>/<device> ` autoupgrade=yes udpfallback=no}
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" ` -ServerAddresses "23.166.164.53", "23.166.164.35", "2602:81f:6000::53", "2602:81f:6000::35"To make sure that it worked, run netsh dns show encryption server=23.166.164.53.