Best public DNS servers – and how to change DNS
Cloudflare, Google, Quad9 and AdGuard DNS compared – addresses, filtering, privacy – with step-by-step instructions for router, Windows, Mac, Android and iPhone.
DNS turns names like example.com into IP addresses. Unless you change it, your provider's DNS servers do this for you. Switching to a public DNS service can block malware or ads, make your lookups private, or simply fix a provider DNS that is slow or down.
The four most used public DNS services
| Service | IPv4 | IPv6 | Encrypted DNS name | Filters |
|---|---|---|---|---|
| Cloudflare | 1.1.1.1 1.0.0.1 | 2606:4700:4700::1111 | one.one.one.one | Nothing (1.1.1.2 blocks malware) |
| Google Public DNS | 8.8.8.8 8.8.4.4 | 2001:4860:4860::8888 | dns.google | Nothing |
| Quad9 | 9.9.9.9 149.112.112.112 | 2620:fe::fe | dns.quad9.net | Known malicious domains |
| AdGuard DNS | 94.140.14.14 94.140.15.15 | 2a10:50c0::ad1:ff | dns.adguard-dns.com | Ads and trackers |
Which to pick: Quad9 is a good default for a family network – it is run by a Swiss non-profit and quietly blocks known phishing and malware domains. AdGuard also removes many ads, but can break some websites. Cloudflare and Google filter nothing and are the fastest choices in most places.
Router – the whole household at once
Log in to your router and put the two addresses into the DNS fields of the Internet (WAN) or DHCP/LAN settings. Devices pick them up after they reconnect.
Windows 11
Settings → Network & internet → Ethernet, or Wi-Fi → Hardware properties → DNS server assignment → Edit → Manual. Turn on IPv4, enter both addresses and set “DNS over HTTPS” to On if offered.
macOS
System Settings → Wi-Fi (or Network) → Details next to your connection → DNS. Remove the old entries with – and add the new ones with +.
Android 9 and newer
Settings → Network & internet (Samsung: Connections → More connection settings) → Private DNS → enter a name from the table, for example one.one.one.one. This encrypts lookups on Wi-Fi and mobile data.
iPhone and iPad
Settings → Wi-Fi → (i) next to your network → Configure DNS → Manual. It applies only to that one Wi-Fi network; for all networks install the service's configuration profile from its website.
Check that it worked
The DNS leak test shows which DNS servers your device really uses. If you still see your provider, the device or browser is overriding the setting – Chrome and Firefox have their own “Secure DNS” option.