Encrypted DNS on a UniFi gateway, called DNS Shield in several Network releases, uses DNS-over-HTTPS to encrypt the connection between the gateway and its upstream resolver. Your ISP can no longer see the names your network looks up, and tampering with upstream answers in transit becomes much harder.
That protection covers only one part of the path. Clients still send plain DNS to the gateway on the LAN, and the gateway then forwards those queries over an encrypted connection to a provider such as Cloudflare, Google, Quad9, or NextDNS, or to a custom server you set up.
The interaction with filtering is where operators get caught out. Content filtering and encrypted DNS both need control of the gateway's upstream lookups, and UniFi has handled that conflict differently across releases — in some versions, turning on one has changed or disabled the other.
Accordingly, after you turn on both, test each one separately rather than trusting the dashboard toggles. A test domain in a blocked category should still fail to resolve, and a DNS leak test from a client should show your chosen encrypted provider rather than your ISP's resolver.
The other half of the problem is encrypted DNS on the clients themselves. Here are the main ways clients bypass the gateway:
- Browser DoH. Firefox, Chrome, Edge, and Safari can send lookups over HTTPS on port 443 straight to a DNS provider and skip the gateway entirely.
- OS-level encrypted DNS. Windows 11, recent macOS and iOS releases, and Android's Private DNS can be set to use an encrypted resolver for the whole device. Android's Private DNS uses DNS-over-TLS on port 853.
- Hardcoded resolvers. Some streaming devices and IoT hardware ship with a fixed DNS server, usually a public resolver on port 53. They ignore whatever DNS server DHCP gives them.
- VPN and relay services. A VPN client or a relay like iCloud Private Relay sends DNS through its tunnel along with everything else, so the gateway never sees the lookup.
None of these are unusual. In fact, some browsers turn on DoH automatically when they detect a supported resolver, so a filtered network can leak lookups even when nobody on it is trying to get around the filter.