Skip to content

Instantly share code, notes, and snippets.

@hansen033
Forked from krcm0209/README.md
Last active October 27, 2023 11:19
Show Gist options
  • Save hansen033/8511d645fc7367bd046407d355207c0f to your computer and use it in GitHub Desktop.
Save hansen033/8511d645fc7367bd046407d355207c0f to your computer and use it in GitHub Desktop.
Using AdGuard DNS over HTTPS (DoH) on Windows 11 with updated domain

Why

You may want to use AdGuard's DNS over HTTPS1 service if you

  1. Want to make it harder for your ISP to know what websites you are requesting (DoH part)
  2. Want to block most traditional ads from your web browsing experience across your entire PC (AdGuard DNS part)
  3. Want to block some malicious site and malware. (AdGuard DNS part)

Setup instructions

  1. (Optional: Skip to step 4) Open PowerShell (Right click on Windows icon, and choose "Terminal (Admin)") Step 1
  2. Add the primary and secondary AdGuard DNS IPv4 and IPv6 addresses2
    netsh dns add encryption server=94.140.14.14 dohtemplate=https://dns.adguard-dns.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=94.140.15.15 dohtemplate=https://dns.adguard-dns.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::ad1:ff dohtemplate=https://dns.adguard-dns.com/dns-query autoupgrade=yes udpfallback=no
    netsh dns add encryption server=2a10:50c0::ad2:ff dohtemplate=https://dns.adguard-dns.com/dns-query autoupgrade=yes udpfallback=no
    
  3. Verify addition of DNS options netsh dns show encryption
    Encryption settings for 94.140.15.15
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    Encryption settings for 94.140.14.14
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    Encryption settings for 2a10:50c0::ad1:ff
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    Encryption settings for 2a10:50c0::ad2:ff
    ----------------------------------------------------------------------
    DNS-over-HTTPS template     : https://dns.adguard.com/dns-query
    Auto-upgrade                : yes
    UDP-fallback                : no
    
    • If you don't see the new DNS options, you may need to run PowerShell with administrator priviledges
  4. Open Settings > Network & internet > Wi-Fi > Hardware properties Step 4
  5. Click the "Edit" button in the DNS servers block Step 5
  6. Change the dropdown setting from "Automatic (DHCP)" to "Manual" Step 6
  7. Ensure both IPv4 and IPv6 are toggled on Step 7
  8. Under IPv4, enter 94.140.14.14 for the Preferred DNS, and 94.140.15.15 for the Alternate DNS Step 8
  9. Under IPv6, enter 2a10:50c0::ad1:ff for the Preferred DNS, and 2a10:50c0::ad2:ff for the Alternate DNS Step 9
  10. Ensure all of the "DNS over HTTPS template" dropdowns are set to "On (automatic template)" if you did step 1-2. If you didn't, choose "On (manual template)" and enter "https://dns.adguard-dns.com/dns-query" for all "DNS over HTTPS template". Step 10
  11. Click "Save" Step 11

Footnotes

  1. https://en.wikipedia.org/wiki/DNS_over_HTTPS

  2. https://adguard-dns.io/en/public-dns.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment