DNS & ISP

Best DNS Servers for Privacy and Security

Whoever runs your DNS server sees every site you look up. Your ISP's default is rarely the most private choice. Here is how the common options compare.

Last updated November 21, 2026 · By Harbor Privacy

The Best DNS Servers at a Glance

Short answer: for privacy plus malware protection, use Quad9. For speed with a strong privacy record, use Cloudflare. To block ads and trackers too, use AdGuard DNS or Harbor Adblock. Skip your ISP's default, and skip Google if privacy is the goal.

  • Best for privacy and malware blocking: Quad9 (9.9.9.9)
  • Best for speed: Cloudflare (1.1.1.1)
  • Best for blocking ads and trackers: AdGuard DNS (94.140.14.14), or Harbor Adblock for every device with no logs
  • Best for no filtering and no logs: Mullvad (encrypted DNS only, host dns.mullvad.net)
ProviderIPv4 (primary, secondary)IPv6DoH / DoT hostNotes
Quad99.9.9.9
149.112.112.112
2620:fe::fe
2620:fe::9
dns.quad9.netBlocks known malicious domains. Non-profit, Switzerland.
Cloudflare1.1.1.1
1.0.0.1
2606:4700:4700::1111
2606:4700:4700::1001
cloudflare-dns.comFast, audited privacy commitment. 1.1.1.2 adds malware blocking.
Google8.8.8.8
8.8.4.4
2001:4860:4860::8888
2001:4860:4860::8844
dns.googleFast and reliable, but run by an ad company and logs some data.
AdGuard DNS94.140.14.14
94.140.15.15
2a10:50c0::ad1:ff
2a10:50c0::ad2:ff
dns.adguard-dns.comBlocks ads, trackers and malware by default.
MullvadEncrypted DNS only (DoH or DoT)Use the hostnamedns.mullvad.netFrom a no-logs VPN company. No filtering on the base server. Plain DNS to its address is refused outside the Mullvad VPN, so use DoH or DoT.

Addresses were tested on the date above (IPv4 plain DNS for Quad9, Cloudflare, Google and AdGuard; Mullvad over DoT). Check the provider's own page if one stops working.

Primary and Secondary DNS: What to Enter

Most devices ask for a primary and a secondary server. The secondary is the backup used if the first does not answer. Use the two addresses from the same provider, such as 9.9.9.9 and 149.112.112.112 for Quad9. Mixing providers works, but your lookups then split across two companies, which spreads your data around instead of protecting it.

To set it, see Change your router DNS to cover your whole home, or Private DNS on iPhone and Android for a phone. Then confirm it took effect with the DNS checker.

Run Your Own: AdGuard Home or Pi-hole

If you do not want to trust any public resolver, run your own filtering server at home. Both AdGuard Home and Pi-hole do this. See AdGuard Home vs Pi-hole to choose, and AdGuard Home on a Raspberry Pi to set it up. Your own server still sends its upstream lookups to someone, so pick a no-logs upstream like Quad9 or Mullvad.

Why Your DNS Server Matters

Every lookup reveals a site you are about to visit. The resolver you use can log those lookups, filter them, or sell them. Choosing one is a privacy decision. See DNS privacy for how it works.

Common Options

  • Your ISP's DNS. The default. Convenient, but your provider sees and may keep your lookups.
  • Quad9 (9.9.9.9). A non-profit based in Switzerland that blocks known malicious domains and publishes a privacy policy.
  • Cloudflare (1.1.1.1). Fast, with a stated privacy commitment and external audits of its claims.
  • Google (8.8.8.8). Fast and reliable, but run by an ad company and subject to its logging practices.
  • AdGuard DNS and similar. Block ads and trackers as well as malware.
  • A private resolver you run or subscribe to. The most control. Harbor Adblock provides filtered DNS for every device.

What to Look For

01
A clear logging policyLook for what is stored and for how long.
02
Encrypted transportDoH or DoT keeps your ISP from reading the lookups.
03
Filtering you wantMalware blocking is a good baseline. Ad blocking is optional.
04
ReliabilityA slow or unstable resolver makes everything feel broken.

Filtering Without Handing Data to a Big Company

Harbor Adblock gives every device filtered DNS with encrypted transport and no logs. See Harbor Adblock, or compare it with a VPN in DNS ad blocker vs VPN.

Related guides: DNS privacy, Private DNS on iPhone and Android, DNS leaks, DoH vs DoT, Change your router DNS.

Common Questions

What are the best primary and secondary DNS servers?
For privacy and malware protection, use Quad9: primary 9.9.9.9 and secondary 149.112.112.112. For speed, use Cloudflare: 1.1.1.1 and 1.0.0.1. Use both addresses from the same provider.
What is the best DNS server for blocking ads?
AdGuard DNS (94.140.14.14 and 94.140.15.15) blocks ads and trackers at the DNS level. Harbor Adblock does the same for every device with encrypted transport and no logs. Neither blocks YouTube video ads, because those are served from the same domains as the video.
What is the most private DNS server?
One that does not log, supports encrypted transport, and is run by a party you trust. A private or self-run resolver gives the most control.
Is Cloudflare 1.1.1.1 private?
It states a strong privacy commitment and has had it audited, but you are still trusting a company.
Is Google DNS safe?
It is reliable, but Google logs some data for a period. Choose a resolver with a stricter policy if privacy is the goal.
Does changing DNS make the internet faster?
Sometimes, if your ISP's resolver is slow. The difference is usually small.
Do I still need a VPN if I use private DNS?
Private DNS hides lookups, but your ISP still sees the addresses you connect to. A VPN hides those too.
GET FILTERED, PRIVATE DNS

Harbor Adblock blocks ads, trackers, and malware for every device. See Harbor Adblock.

Harbor Privacy
Cut Big Tech out of your home network.

Encrypted DNS and network-level blocking of trackers and ads on every device, set up in minutes. No technical skills required.

See plans →