The best-known public DNS servers in the US are Google (8.8.8.8 and 8.8.4.4), Cloudflare (1.1.1.1 and 1.0.0.1), Quad9 (9.9.9.9 and 149.112.112.112) and OpenDNS (208.67.222.222 and 208.67.220.220). They differ mainly in filtering and logging, not in how you set them up.
Addresses and policies below are from each operator's own documentation, as of November 2026. Check the linked sources before relying on a policy, since operators change them.
Public DNS server addresses compared
| Service | IPv4 | IPv6 | Filtering |
|---|---|---|---|
| Google Public DNS | 8.8.8.8, 8.8.4.4 | 2001:4860:4860::8888, 2001:4860:4860::8844 | None stated |
| Cloudflare 1.1.1.1 | 1.1.1.1, 1.0.0.1 | 2606:4700:4700::1111, 2606:4700:4700::1001 | None |
| Cloudflare, malware blocking | 1.1.1.2, 1.0.0.2 | 2606:4700:4700::1112, 2606:4700:4700::1002 | Malware |
| Cloudflare, malware and adult content blocking | 1.1.1.3, 1.0.0.3 | 2606:4700:4700::1113, 2606:4700:4700::1003 | Malware and adult content |
| Quad9 Recommended | 9.9.9.9, 149.112.112.112 | 2620:fe::fe, 2620:fe::9 | Malware blocking, DNSSEC |
| Quad9 Secured with ECS | 9.9.9.11, 149.112.112.11 | 2620:fe::11, 2620:fe::fe:11 | Malware blocking, DNSSEC, EDNS Client Subnet |
| Quad9 Unsecured | 9.9.9.10, 149.112.112.10 | 2620:fe::10, 2620:fe::fe:10 | No malware blocking |
| OpenDNS | 208.67.222.222, 208.67.220.220 | Not covered here | Standard service |
| OpenDNS FamilyShield | 208.67.222.123, 208.67.220.123 | Not covered here | FamilyShield service |
I did not verify OpenDNS IPv6 addresses or what FamilyShield filters. OpenDNS's setup guide only says to use the FamilyShield nameservers when setting up that service.
Which public DNS server should you pick?
- You want no filtering: Google or Cloudflare
1.1.1.1. Quad9's "Unsecured" set also does no malware blocking, but Quad9 labels it for experts. - You want malware domains blocked at the DNS level: Quad9 Recommended (
9.9.9.9) or Cloudflare1.1.1.2. - You want adult content blocked as well: Cloudflare
1.1.1.3, or OpenDNS FamilyShield. - You use a CDN-heavy service and want the resolver to pass part of your network location: Quad9 "Secured with ECS" sends EDNS Client Subnet data. That helps some services pick a closer server, and it also shares more about your network with them.
What each provider logs
Whoever runs the resolver sees every domain you look up. Two operators publish concrete retention figures:
| Provider | Retention stated in its documentation |
|---|---|
| Temporary logs, which include the client IP address, are kept for about 24 to 48 hours. Permanent logs are a sample with the IP removed and replaced by a city or region location. The page gives no retention period for them. | |
| Cloudflare | Says it deletes public resolver logs within 25 hours. Randomly sampled packets from at most 0.05% of traffic are used for troubleshooting and DoS mitigation. Aggregated statistics may be stored indefinitely. Says it will not sell or share personal data of resolver users or use it to target ads. |
I did not verify Quad9's or OpenDNS's retention policies, so read their privacy pages yourself if that is your deciding factor.
How to switch to a public DNS server
On Windows, follow how to change the DNS server on Windows. In short, enter both addresses of one service, for example:
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses 9.9.9.9,149.112.112.112
Run it in an administrator PowerShell and replace Wi-Fi with your adapter name. Changing the setting on your router instead applies it to every device that takes its DNS from that router. Don't mix addresses from different services in one list unless you accept that either one may answer, which defeats any filtering.
After switching, run ipconfig /flushdns (see flush the DNS cache) so old answers don't linger.
Encrypted DNS: DoT and DoH
Plain DNS on port 53 is readable by anyone on the path. Two operators document encrypted endpoints in the sources above. Google lists dns.google as its DNS-over-TLS hostname (used as the Private DNS hostname on Android 9). Quad9 lists https://dns.quad9.net/dns-query for DNS-over-HTTPS and tls://dns.quad9.net for DNS-over-TLS on the Recommended service, with dns11 and dns10 variants for the other two. For how DoH works and how to turn it on, see DNS over HTTPS explained.
If a public DNS server isn't working
Look up a name against one resolver directly, for example nslookup example.com 8.8.8.8. If that answers but your normal lookups fail, the problem is your configured server, not the internet. If a filtering service blocks a site you need, switch to its unfiltered set, such as Cloudflare 1.1.1.1 or Quad9 Unsecured, to confirm the block is the cause. For other symptoms see DNS server not responding.
Frequently asked questions
- Which public DNS server is the fastest?
- It depends on where you are and which network you use, so no single answer holds for everyone. Test each resolver from your own connection with nslookup or Resolve-DnsName and compare the response times over several lookups. Speed only affects the first lookup of a name, since later lookups are cached.
- Is it safe to use a public DNS server?
- Public resolvers from large operators are widely used, but the operator can see every domain you look up, so you are trading your ISP's visibility for theirs. Read the operator's privacy page. Quad9 and Cloudflare filter or log differently from Google, as the table above shows.
- Should I enter both the primary and secondary address?
- Yes. Each service gives two addresses so that DNS keeps working if one path fails. Quad9 specifically recommends entering all of the listed addresses for the service you choose.
- Can I use a public DNS server and keep my ISP's connection?
- Yes. DNS is separate from your internet connection. Changing the resolver only changes who answers name lookups; your ISP still carries the traffic. Traffic to the sites themselves is unaffected.