Should private DNS mode be on or off?
Private DNS mode should be on, set to a hostname you chose. Here is what the toggle does, when it breaks wifi logins or internal names, and how to tell.
Private DNS mode: on, with one exception
Turn private DNS mode on, and point it at a resolver hostname you picked yourself. Set it back to Automatic or Off only when the network you are joining has to answer your DNS queries itself: captive portal wifi before you log in, a company or home network that holds internal names, or a VPN that supplies its own resolver.
That is the whole decision. The rest of this guide is the mechanism, because each of those exceptions looks the same from where you are standing: pages do not load, and nothing on the screen mentions DNS. For the background on the protocol behind the switch, what private DNS mode is and which transports it uses covers it, and how a name turns into an address covers the layer underneath.
What the toggle actually does
The control has three positions, and they behave nothing alike.
Off. Queries leave in cleartext over UDP or TCP port 53, to the network's resolver; a truncated UDP answer triggers a retry over TCP. Anyone on the path reads the names and can rewrite the answers. That includes the café router, the hotel gateway, and your ISP.
Automatic. This attempts encrypted DNS with the resolver the network gave you, with cleartext fallback. For DoT (DNS over TLS, which is ordinary DNS carried inside a TLS session on port 853), the device probes that resolver on port 853. If the TLS handshake works, queries go encrypted. Supported Android 11+ devices also use DNS over HTTP/3 with supported well known resolvers. If encrypted DNS is unavailable, queries go out in cleartext on port 53, with nothing on screen to tell you. Opportunistic DoT also validates no certificate name, because you never gave it a name to check. So it stops passive reading, and it does not stop a resolver that wants to lie to you.
Private DNS provider hostname. This is strict mode. You type a hostname such as dns.quad9.net, and the device uses that provider for ordinary DNS queries while still using the network's resolver to look up the provider hostname. For DoT, it opens TLS to port 853 on that host and checks the certificate against the hostname you typed. If the provider hostname cannot be resolved or the encrypted connection cannot be established, system DNS queries fail. Strict mode fails closed, which is the property you are paying for: there is no silent downgrade to cleartext.
One detail explains much of the odd behaviour below. The device has to turn your hostname into an address before it can connect to it, and it does that using the network's own resolver. A network that answers every query with its own address can therefore break strict mode at that first bootstrap step, before any TLS is attempted.
Recent Android builds may upgrade a small set of well known hostnames to DNS over HTTPS instead, but plan on port 853 being the one that has to be reachable. Other systems have the same setting under other names: DNSOverTLS=yes in systemd-resolved on Linux, an encrypted DNS profile on iOS and macOS, a DoH setting inside the browser, or a DoT forwarder on the router.
What private DNS protects, and what it does not
Private DNS hides your queries from the network you are sitting on. It does not hide them from the resolver operator. Your query log moves from everyone on this wifi, plus every hop after it to one operator you chose. That is a real improvement, and a narrow one. State it that way when someone tells you encrypted DNS makes you anonymous.
It also does not hide where you went. Once the name resolves, your device opens a connection to an address, and that address is visible to the network. The TLS handshake that follows usually carries the site's name in cleartext in the SNI field (server name indication), so an observer can often still name the site you opened. DNS encryption removes the easiest signal, not the last one.
So "should private DNS be on" is really two questions. Is the transport encrypted: yes, turn it on. Who is on the other end: your call, and that one matters more.
When private DNS mode should be off or automatic
Captive portal wifi that never shows its login page
You join hotel or airport wifi. The phone says connected, no internet, and the login page never loads in your browser.
Some captive portals intercept DNS on port 53 and answer names with the portal's own address; others redirect HTTP traffic or advertise a portal API without forging DNS responses. Strict mode can fail before login if the network interferes with the provider hostname lookup or blocks access to the encrypted resolver. Android's own portal check is the exception. It makes HTTP probes over a network handle that deliberately bypasses private DNS (current AOSP NetworkStack source, checked November 13, 2026), so the phone still detects the portal and normally still offers you the sign-in prompt. If strict mode cannot reach its provider, ordinary browser lookups can still fail after you dismiss that prompt.
What you see: Private DNS server cannot be accessed in the network details, or a saved network listed as connected with no internet.
If the sign-in prompt has gone, or the login page will not load, the fix is to set Automatic or Off, complete the login, then put the hostname back. On stock Android the setting is global, not per network, so nothing puts it back for you. That is the one honest argument for leaving a travel phone on Automatic.
Internal names that only the local resolver knows
This is split horizon: a name that resolves on the local resolver and nowhere else, or that resolves to one address inside the network and a different address outside it. nas.home.arpa and git.corp.example.com are the usual shapes. Strict mode sends that query to your public provider, which returns NXDOMAIN (no such domain) or the public address, so your internal service is unreachable, or reached the long way round over the internet.
These are checks you run yourself on the network in question, and the output depends on your own zones:
dig +short git.corp.example.com @192.168.1.1
dig +short git.corp.example.com @9.9.9.9Two different addresses, or an answer from the local resolver and an empty answer from the public one, is split horizon confirmed. On a Linux laptop, resolvectl query git.corp.example.com shows the interface and protocol used, rather than which DNS server answered.
You have two ways out. Use Automatic on that network and accept cleartext DNS on a network you already trust with your traffic. Or run a resolver that knows the internal zone, give it a hostname you own and a certificate for it, and point strict mode at that. The second option is why a lot of readers end up running their own resolver on a VPS: a DoT endpoint needs a certificate for a real name, which is what a wildcard certificate issued over the DNS-01 challenge is for.
A VPN or mesh network that already supplies a resolver
If your WireGuard client config carries DNS = 10.8.0.1, or your mesh network has its own internal domain, then the private DNS hostname is competing with it. On Android 10 and later a hostname in strict mode keeps applying while the tunnel is up, so the resolver your tunnel advertises may never be asked ordinary DNS queries. The symptom is specific: the tunnel is healthy, wg show lists a recent handshake, public sites load, and internal names fail while a DNS leak test names your private DNS provider instead of your own server. Tailscale users report the same collision from the other side: a feature request on Tailscale's own issue tracker (checked October 2026) states that Android's private DNS cannot be used at the same time as MagicDNS, and the usual workaround is private DNS off or automatic on Android.
Fixing DNS over a WireGuard tunnel goes through the combinations in detail, and the DNS line in a WireGuard server build shows where the in-tunnel resolver comes from in the first place. If the tunnel will not even connect on that network, check whether its endpoint hostname resolves before ruling out DNS: see what to run when your VPN is blocked. On the mesh side, what a mesh network is and is not and sending your traffic out through an exit node on your own VPS both change which resolver should win.
How to tell which one is biting you
Work down this list. Each step tests part of the path; no single result separates every cause.
- Set the toggle to Automatic and retry. If it works, the toggle is the cause and you are choosing between the cases above. If nothing changes, DNS is still a possible cause because Automatic also depends on a working resolver.
- Read the network details on the phone.
Private DNS server cannot be accessedmeans Private DNS evaluation failed; an incorrect or unresolvable provider hostname can fail before any TLS connection is attempted. - Reach an address instead of a name:
ping -c2 1.1.1.1. Replies here with names still failing is the signature of a DNS problem rather than a routing problem. - From a laptop on the same wifi, test the port and the resolver directly.
nc -vz dns.quad9.net 853tests a TCP connection to Quad9, andkdig +tls @dns.quad9.net example.comanswers whether the resolver itself is responding over TLS without certificate validation. Use your configured provider's hostname in both commands; usekdig +tls-ca @dns.quad9.net example.comto validate Quad9's certificate against that hostname too.kdigcomes from theknot-dnsutilspackage. - If the port is open and the resolver answers from the laptop but the phone still fails, check the hostname for a typo. Strict mode validates the certificate against exactly what you typed, so one wrong character fails closed with the same message as a blocked port.
Picking the hostname is the real decision
Strict mode hands one operator every name you look up. So judge a candidate on two things: who runs it and under which country's law, and what they keep. Filtering is a separate axis. Some hostnames drop malware and ad domains for you, which is useful right up to the day it drops something you needed and gives you an NXDOMAIN with no explanation. AdGuard DNS is a common pick for exactly that ad filtering, so it is worth reading where AdGuard is registered and what its DNS service keeps about your queries before you hand it every lookup.
As of September 2026 the widely used public endpoints are dns.quad9.net (Quad9, a Swiss foundation, filters known malicious domains), one.one.one.one (Cloudflare), and dns.google. Any of them is a large improvement over cleartext DNS to a hotel router. None of them removes the operator from the picture.
Quad9 has announced that it will stop serving users located in France on November 24, 2026. If you use Quad9 there, choose another provider before that date, including for the laptop configuration below.
Running your own resolver on a VPS moves that trust to you. Be clear about the trade before you do it. You control the logging policy and you can serve your internal zone, which solves the split horizon case for every network you join. In exchange, your queries now leave one IP address that belongs only to you, so the recursive path and the authoritative servers see a crowd of one instead of your queries mixed into millions. A shared resolver hides you in volume. Your own resolver hides you not at all, while giving you control over the record. Pick the one that matches what you are actually worried about.
Doing it on a laptop or a router
On a systemd box, strict DoT is one drop-in file. Write /etc/systemd/resolved.conf.d/dot.conf:
[Resolve]
DNS=9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net
DNSOverTLS=yesThe text after # is the name the certificate must match; leaving it off makes systemd-resolved check the certificate against the server's IP address instead. Apply and check:
sudo systemctl restart systemd-resolved
resolvectl status
resolvectl query example.comresolvectl status should print +DNSOverTLS in the protocol line and list your servers with their names attached. A query that now takes noticeably longer on the first lookup and then speeds up is normal, because the TLS session is set up once and reused.
Doing it on the router instead covers devices on the LAN that use the router for DNS, including the ones with no setting of their own, such as a television or a printer. Two limits come with that. The hop from each device to the router stays in cleartext on the LAN, so anyone already on your wifi still sees the names. And the coverage ends at your front door: the phone leaves the house and goes back to whatever the next network hands it. The device setting travels. The router setting does not.
FAQ
Should private DNS be on or off on Android?
On, set to a provider hostname rather than left on Automatic, because Automatic falls back to cleartext port 53 without telling you. Switch it to Automatic only for the specific networks that must resolve names for you: captive portal wifi you have not signed into, a network with internal names, or a VPN whose own resolver you want to use. The setting is global on stock Android, so remember to set it back.
Why does Android say "Private DNS server cannot be accessed"?
Private DNS evaluation failed, so ordinary system DNS queries cannot use the configured provider. Causes include an incorrect or unresolvable hostname, an unreachable resolver, and a failed TLS connection or certificate check. Test from a laptop on the same network with nc -vz dns.quad9.net 853, replacing Quad9's hostname with your configured provider's hostname. This tests TCP reachability only: success proves neither TLS nor certificate validity, and failure can come from name resolution, the server, or the network. Use kdig +tls-ca @dns.quad9.net example.com, again substituting your provider's hostname, to test a DNS query over TLS with certificate validation.
Does private DNS mode hide my browsing from my ISP?
It hides the names you look up from the network you are on, including your ISP, and it moves that visibility to the resolver operator you chose. It does not hide the addresses you then connect to, and the TLS handshake after the lookup usually carries the site name in cleartext in the SNI field. So an observer loses the easiest record of your browsing and keeps a harder one.
Why do internal or VPN names stop resolving when private DNS is on?
Because strict mode sends ordinary system DNS queries to your chosen public resolver, and that resolver has never heard of nas.home.arpa or your company's internal zone. It answers NXDOMAIN, or it answers with the public address when the name exists in both views. The same thing happens to a VPN that advertises its own resolver, since the private DNS hostname keeps applying while the tunnel is up on Android 10 and later. Either set the toggle to Automatic on those networks, or run a resolver that serves the internal zone and expose it on 853 with a valid certificate so strict mode can use it everywhere.