Configure Static DNS with DoH on Windows 11
Setting up static DNS servers with DNS-over-HTTPS (DoH) in Windows 11 enhances your privacy and security by encrypting standard DNS queries. This guide provides clear, step-by-step instructions to manually assign static IPv4 or IPv6 DNS addresses and enable built-in DoH encryption templates directly through the Windows 11 Settings app.
Step 1: Open Network Adapter Properties
- Press
Win + Ito open Settings. - Select Network & internet from the left sidebar.
- Click on your active connection type: Ethernet (for wired connections) or Wi-Fi (for wireless connections).
- If using Wi-Fi, click on Manage known networks and select your current network to open its properties.
Step 2: Edit DNS Server Assignment
- Scroll down to find the DNS server assignment section.
- Click the Edit button next to it.
- In the drop-down menu, change the setting from Automatic (DHCP) to Manual.
Step 3: Configure Static DNS and Enable DoH
- Toggle the IPv4 switch to On (you can also enable IPv6 if your network supports it).
- Enter your chosen static DNS addresses into the Preferred
DNS and Alternate DNS fields. Common
privacy-focused providers with native DoH support in Windows 11 include:
- Cloudflare:
1.1.1.1(Preferred) and1.0.0.1(Alternate) - Google:
8.8.8.8(Preferred) and8.8.4.4(Alternate) - Quad9:
9.9.9.9(Preferred) and149.112.112.112(Alternate)
- Cloudflare:
- Under DNS encryption, select one of the following
options:
- Encrypted only (DNS over HTTPS): Windows will drop DNS requests if DoH fails.
- Encrypted preferred, unencrypted allowed: Windows will fall back to unencrypted DNS if DoH fails.
- Set the DNS encryption preference for both the Preferred and Alternate DNS entries.
- Click Save to apply the configuration.
Step 4: Adding Custom DoH Providers (Optional)
If you use a custom DNS provider not recognized automatically by Windows 11, you must register the DoH template via PowerShell:
Right-click the Start button and select Terminal (Admin) or PowerShell (Admin).
Run the following command to register a custom DoH server template:
netsh dns add encryption server=<IP_ADDRESS> dohtemplate=<DOH_URL> autoupgrade=yes udpfallback=noReplace
<IP_ADDRESS>with the static IP of your DNS server and<DOH_URL>with the provider’s HTTPS endpoint.Return to Windows Settings and apply the static DNS server using the steps outlined above.