DNS over HTTPS and DNS over TLS
Compare encrypted DNS options, see what they hide and what they don't, and turn them on in browsers, phones and computers.
Key takeaways
- Traditional DNS travels unencrypted, so anyone on the path can see and tamper with lookups.
- DoT and DoH provide the same basic protection and differ mainly in port, visibility and where they are configured.
- Encryption moves your trust to the resolver operator and does not hide your destinations from them.
- Managed networks, filters and local names can conflict with encrypted DNS, so check settings when something stops resolving.
DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt the questions your device asks a DNS resolver, so others on the network path can't read or alter them. DoT sends DNS inside a TLS connection on its own port, 853. DoH sends it inside ordinary HTTPS on port 443, where it blends in with web traffic.
Both protect the trip between you and the resolver. The resolver still sees every name you ask for, and the websites you then visit can still be partly identified. Turning it on is worthwhile for most people, as long as you pick a resolver you're willing to trust.
Why plain DNS is exposed
Classic DNS sends queries over UDP or TCP port 53 as readable data. Your internet provider, the operator of a café's Wi-Fi or anyone who can observe that network can log which names you look up. Someone in a position to modify traffic can also change the answers.
HTTPS protects the contents of web pages, but the lookup that happens just before it has historically been left in the open. What your internet provider can see puts this in context.
DNS over TLS
DoT is specified in RFC 7858. The client opens a TCP connection to the resolver on port 853, performs a TLS handshake and then sends normal DNS messages inside the encrypted channel. The client can check the resolver's certificate against a configured hostname, which stops an impostor from posing as your resolver.
DoT is usually set up at the system or router level. Because it uses a dedicated port, a network administrator can easily see that it's in use and allow or block it. Android's "Private DNS" setting uses DoT when you enter a provider's hostname.
DNS over HTTPS
DoH is specified in RFC 8484. DNS messages travel as HTTPS requests and responses, with the media type application/dns-message, to an address such as https://dns.example.com/dns-query. It benefits from HTTP/2 or HTTP/3 features, including reusing one connection for many queries.
Because it shares port 443 with the web, it's harder to single out. Browsers were early adopters and can use DoH on their own, independent of the operating system's resolver. That's convenient, and it also means one computer may be using two different resolvers.
A newer relative, DNS over QUIC (DoQ), is specified in RFC 9250 and carries DNS over the QUIC transport. Support is less widespread. See QUIC explained.
What stays visible
Encrypted DNS closes one window. Others remain.
- The resolver receives your queries and your IP address. Its privacy policy is what protects you there.
- Destination IP addresses are visible to your network provider, and often identify the service.
- The server name in the TLS handshake, called SNI, is typically sent in the clear. Encrypted Client Hello is designed to hide it, but depends on both browser and site support.
- Traffic patterns such as timing and volume still leak information.
- The resolver's own lookups to authoritative servers are mostly not encrypted by DoH or DoT, which cover only your leg.
So encrypted DNS is not a substitute for a VPN, and neither one makes you anonymous. What a VPN does and does not do compares the protection.
Encryption and authenticity are different jobs
DoH and DoT secure the channel to the resolver. They don't prove that the records the resolver obtained are genuine. That is the job of DNSSEC, which signs the data itself. The two complement each other: a validating resolver reached over an encrypted channel covers both concerns. DNSSEC explained shows how validation works.
Choosing a resolver
Many large public resolvers and some internet providers offer encrypted endpoints. Before choosing, read what the operator says about logging, retention, sharing and filtering. Consider whether you want malware or adult-content blocking, and where the company operates. Public DNS resolvers lists the questions to ask.
There's also a policy debate. Supporters say encrypted DNS protects people on hostile or snooping networks. Critics say that when browsers send lookups to a few large operators, it concentrates data and bypasses protections that households, schools and companies run on their own resolvers. Many implementations try to address this by upgrading only when your current resolver supports encryption, or by letting administrators switch the feature off.
Turning it on
Menu names change between versions, so treat these as a map.
Browsers. Look in privacy or security settings for "secure DNS" or "DNS over HTTPS". You can usually keep your current provider, pick one from a list or enter a custom address.
Android. In network settings, find "Private DNS" and enter the resolver's hostname. This applies system-wide.
Windows. Recent Windows 11 versions let you set DNS servers per network adapter and choose an encryption option for supported resolvers.
Apple devices. iOS and macOS support encrypted DNS through configuration profiles or apps from resolver providers. Only install profiles from sources you trust, since a profile can change a lot.
Routers. Some routers offer DoT or DoH for the whole household. This covers devices that have no setting of their own. How to change DNS servers has more on each platform.
Checking that it works
Many resolver operators provide a test page that reports whether your query arrived encrypted. On a command line with a recent dig from BIND, you can test an endpoint directly.
dig @1.1.1.1 example.com +tls
dig @1.1.1.1 example.com +https Older versions don't recognize these options. A successful result proves that the resolver accepts encrypted queries from your network, not that your browser or system is using them.
Running encrypted DNS at the router
Setting it on the router covers televisions, game consoles and smart-home devices that offer no option of their own. The pattern is a forwarder: your devices send ordinary DNS across your home network to the router, and the router sends encrypted queries onward.
That protects the stretch outside your home, which is the part your provider and the wider internet can observe. The local hop stays readable to anyone already on your network, which makes a strong Wi-Fi password and a separate guest network worthwhile.
Look for a DNS privacy, DoT or DoH option in the router's settings. You usually need the resolver's IP address and its hostname, which the router uses to verify the certificate. Check the clock setting too, because certificate validation fails if the router thinks it's the wrong year. Some devices ignore the router's DNS and use their own, and this setting won't change that.
Which should you choose?
For most people the practical answer is whichever one the device offers with a resolver they trust. Use the browser's DoH switch if the browser is where you spend your time. Use Android's Private DNS or a router's DoT option to cover everything at once. On a work device, follow the policy your IT team has set, since they may rely on internal resolution and filtering.
When it causes trouble
- Local names stop resolving. A public resolver knows nothing about your printer or your company's internal hosts.
- Parental or office filtering is bypassed, because the browser no longer asks the filtering resolver.
- Captive portals on hotel or airport Wi-Fi may need plain DNS until you've signed in.
- Port 853 is blocked, so a strict DoT setting leaves you with no name resolution at all.
- VPN clients may override the setting or conflict with it.
Most software offers a strict mode, which fails rather than fall back to plain DNS, and an opportunistic or automatic mode, which falls back. Strict is safer against interference. Automatic is more forgiving. Pick according to which failure bothers you more.
Advice for administrators
If you run a network with its own resolver, offer encrypted DNS on it so clients have no reason to go elsewhere. Use your device management tools to set browser DNS policy on managed machines, and tell users what's logged. Remember that DoH to arbitrary servers is difficult to control at the firewall, which makes device policy more dependable than port blocking. For households, DNS filtering explains how to combine protection with a browser's own setting.
Common questions
Does encrypted DNS make browsing faster?
It can be slightly slower on the first query while the connection is set up, and about the same afterward. Speed depends more on the resolver's distance and caching.
Should I use both DoH in the browser and DoT on the system?
You can. The browser setting covers only that browser, while the system setting covers everything else. Using the same resolver for both keeps behavior consistent.