DNSDNS The internet’s phone book. It turns a name people can remember, like example.com, into the number address computers use to find the server. More about DNS → over HTTPS (DoH) is a way of sending DNS lookups inside ordinary encrypted web traffic, so the network you are on cannot read or tamper with the names you look up. This guide is for anyone who has seen a “secure DNS” switch in a browser or in Windows and wants to know what it does, how to turn it on, how to test it, and what it changes for a site or server you look after.
DNS over HTTPSHTTPS The secure version of the web, shown by the padlock. Everything sent between you and the site is scrambled so nobody in between can read or change it. More about HTTPS → wraps each DNS question in an encrypted HTTPS request on portPort A numbered door on a server. Each service listens behind its own door: web pages on 443, email on others, remote login on 22. More about Port → 443, sent to a resolver such as https://cloudflare-dns.com/dns-query or https://dns.google/dns-query. Turn it on in Firefox (Privacy & Security, DNS over HTTPS), Chrome or Edge (Use secure DNS) or Windows 11 (DNS server assignment, DNS over HTTPS). Test it at one.one.one.one/help or with dig +https @1.1.1.1 example.com. It protects lookups in transit, but the resolver you choose still sees every name.
What DNS over HTTPS actually does
Before your browser can open example.com, it needs the server’s IP addressIP address The number address of a device on the internet, like 203.0.113.10. Computers use it to find each other, the way post uses street addresses. More about IP address →. It asks a recursive resolver, a DNS server that chases the answer for you. Traditionally that question travels as plain text on port 53. Anyone in between can read it: the café Wi-Fi, the hotel network, your internet provider. They can also change the answer and send you somewhere else.
DNS over HTTPS fixes the transport. Your device opens an HTTPS connection to the resolver, exactly as it would to a website, and sends the DNS question inside it. The resolver proves who it is with a normal SSL/TLS certificate, so a hostile network cannot pretend to be it. The question and answer are encrypted end to end between you and that resolver.
The standard is RFC 8484, published in 2018. A DoH resolver is identified by a URL, called a template, rather than just an IP address. Common ones:
| Resolver | DoH URL |
|---|---|
| Cloudflare | https://cloudflare-dns.com/dns-query |
| Google Public DNS | https://dns.google/dns-query |
| Quad9 | https://dns.quad9.net/dns-query |
The DNS records themselves do not change. An A recordA record The line in a domain’s settings that says which server’s address to send visitors to. Like a forwarding address card for your website. More about A record → for example.com still says 203.0.113.10. DoH only changes how the question and answer travel.
DoH, DoT and plain DNS compared
DoH has a close relative, DNS over TLS (DoT), which is what Android calls Private DNS. Both encrypt lookups. The difference is how visible they are.
| Plain DNS | DNS over TLS | DNS over HTTPS | |
|---|---|---|---|
| Port | 53 (UDP and TCP) | 853 (TCP) | 443 (TCP, or UDP with HTTP/3) |
| Encrypted | No | Yes | Yes |
| Easy for a network to spot and block | Yes | Yes, by port | No, looks like web traffic |
| Where you usually meet it | Everywhere by default | Android Private DNS, Linux servers | Browsers, Windows 11 |
Because DoH shares port 443 with every website, a network cannot tell it apart from normal browsing without blocking the resolver’s address. That is good for privacy on untrusted networks. It is less welcome to a company or school that relies on its own DNS for filtering, which is why browsers include ways for those networks to opt out (covered below).
What DoH protects, and what it does not
DoH is useful, but it is easy to expect too much from it.
It does protect against:
- People on the same network reading which sites you look up.
- An attacker on the path quietly changing DNS answers.
- Some internet providers injecting adverts or redirect pages into failed lookups.
It does not:
- Hide your lookups from the resolver. Cloudflare, Google or whoever you choose sees every name. You are moving trust, not removing it.
- Hide the site you then visit. Your provider still sees the server’s IP address, and in many cases the site name in the TLS handshake.
- Make a VPN unnecessary, or prove the answer is genuine at the source. That is the job of DNSSEC, a separate system.
If you use a VPN, browser DoH can send lookups straight to its own resolver and bypass the VPN’s DNS. Firefox turns its automatic DoH off when it detects a VPN, but a manually chosen provider stays on. Run a DNS leak test after changing either setting.
How to turn on DNS over HTTPS
You can switch DoH on in the browser (it then applies to that browser only) or in the operating system (it applies to every app).
Firefox
- Open Settings and choose Privacy & Security.
- Scroll to DNS over HTTPS.
- Choose a protection level. Default Protection uses DoH where Firefox offers it and falls back to your normal DNS if there is a problem. Increased Protection always uses the provider you pick and falls back only if it fails. Max Protection always uses DoH and shows a warning before falling back.
- Under the level, pick a provider or choose Custom and paste a DoH URL from the table above.
Chrome and Edge
- In Chrome, open Settings, Privacy and security, then Security. In Edge, open Settings, Privacy, search, and services and find the Security section. Typing “secure DNS” into the settings search box works in both.
- Turn on Use secure DNS.
- Leave it on your current service provider, or choose a provider from the list, or enter a custom DoH URL.
With “current service provider”, Chrome and Edge upgrade to DoH only if the resolver your system already uses supports it. Otherwise they carry on with plain DNS.
Windows 11
- Open Settings, Network & internet, then Wi-Fi or Ethernet, and select your connection (for Wi-Fi, open Hardware properties).
- Next to DNS server assignment, click Edit and choose Manual.
- Turn on IPv4, enter a resolver address such as
1.1.1.1and set DNS over HTTPS to On (automatic template). Repeat for the alternate DNS and for IPv6 if you use it. - Save. The DNS servers listed for the connection should now show (Encrypted).
Windows only knows the DoH template for some well-known resolvers. For another provider choose On (manual template) and paste its DoH URL. Labels differ slightly between Windows 11 versions; some builds call the setting Preferred DNS encryption. To see which resolvers Windows already has templates for, run this in PowerShell:
Get-DnsClientDohServerAddress
Phones, Macs and Linux servers
- Android: the Private DNS setting uses DNS over TLS. Our Private DNS guide, linked below, shows what to enter.
- iPhone, iPad and Mac: Apple supports encrypted DNS, but there is no simple switch. It is set by an app or a configuration profile from your resolver, or by a browser setting.
- Ubuntu and other Linux servers:
systemd-resolvedsupports DNS over TLS (theDNSOverTLS=setting in/etc/systemd/resolved.conf) but not DoH. For DoH you need a small local proxy such as dnscrypt-proxy that listens on 127.0.0.1 and forwards lookups over HTTPS. On most servers, DoT is the simpler choice.
How to check DoH is working
The quickest check is in the browser. Visit https://one.one.one.one/help while using Cloudflare. It reports Using DNS over HTTPS (DoH) as Yes or No. Other providers have their own test pages, but this one is easy to read.
From a terminal, you can send a DoH query directly. On Ubuntu 22.04 or 24.04 and Debian 12, the dig command from the bind9-dnsutils package supports +https:
dig +https @1.1.1.1 example.com A
A working answer has status: NOERROR, an ANSWER section with an address, and a SERVER line ending in (HTTPS). If it times out, something on your network is blocking the resolver.
You can also ask a resolver’s JSON interface with curl, which works on Windows, macOS and Linux:
curl -s -H "accept: application/dns-json" "https://cloudflare-dns.com/dns-query?name=example.com&type=A"
curl -s "https://dns.google/resolve?name=example.com&type=A"
Each returns the answer as JSON, with "Status": 0 meaning success. This is a handy way to compare what a public resolver sees with what your own computer sees, for example during DNS propagation.
What DoH means for site owners and network admins
Your website or server
You do not need to change anything on your server to support visitors who use DoH. They still look up your normal records; they just ask a different resolver. Two things are worth knowing:
- Stale answers after a move. When a browser uses DoH, its lookups do not go through the operating system, so flushing the system DNS cache may not change what that browser sees. Clear the browser’s own cacheCache A saved copy of something, kept so it does not have to be made or fetched again. Like keeping a printed copy instead of reprinting it for every person who asks. More about Cache → too. In Chrome and Edge that is
chrome://net-internals/#dnsand Clear host cache; in Firefox, restarting the browser is the simplest fix. - “It works for me” puzzles. Two people on the same network can get different answers if one browser uses DoH to Cloudflare and the other uses the provider’s resolver. Check the browser setting before you blame the server.
A home or office network that filters DNS
If you run a DNS filter, such as a parental control or a company resolver, browser DoH can quietly bypass it. Your options:
- Make your filtering resolver answer the canary domain
use-application-dns.netwith no address (NXDOMAIN). Firefox then switches off its automatic DoH on that network. It does not override a provider the user picked themselves. - On managed computers, set the browser’s policy:
DnsOverHttpsModefor Chrome and Edge, or theDNSOverHTTPSpolicy for Firefox. - Run your own resolver with DoH support, so devices encrypt their lookups but still use your filter.
Blocking port 443 is not an option, since that is all web traffic. Blocking DoH completely means blocking the resolvers’ addresses, which is a constant chase.
Common problems
| Symptom | Cause | Fix |
|---|---|---|
| Sites fail to load after turning on Max Protection | The network blocks the DoH resolver | Try another provider, or drop to Default Protection on that network |
| Test page says DoH is not in use | The setting applies to one browser only, or Chrome stayed on plain DNS with your current provider | Choose a specific provider in that browser, or set DoH in Windows |
| Internal names such as intranet.example.com stop resolving | A public DoH resolver cannot see your private DNS zone | Turn DoH off on that network, or use the company resolver |
| Old IP still shown after a site move | The browser’s own DNS cache | Clear the browser host cache or restart the browser |
| Windows shows Unencrypted next to the DNS server | No DoH template known for that address | Choose On (manual template) and enter the provider’s DoH URL |
dig +https reports an unknown option | An older dig without DoH support | Use the curl JSON test, or update to the BIND 9.18 tools |
Official documentation
Related
- What is Private DNS?: the DNS over TLS setting on Android and how to test it.
- DNS port: which ports plain and encrypted DNS use, and what to open in a firewallFirewall A gatekeeper that decides which connections are allowed into a server and blocks the rest. More about Firewall →.
- Google DNS: setting a public resolver by address on every device.
- How HTTPS works: the TLS connection and certificate check that DoH relies on.
Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.


