Choosing a Public DNS Resolver
evilbit.deEvery time that this comes up, be it a general list like this or someone announcing a new service, my reaction, and that that I see of surprisingly many other people on Hacker News, is fairly unmoved. I've run my own proxy DNS service for about a quarter of a century at this point, using three different sets of softwares on six different operating systems, and every single point on the filter tab is something that I can (and do) just do for myself.
The list is not so much interesting for the options that it presents, as far as I am concerned, but for the things that it reveals. Every single entry that is explicitly marked 'China' also has 'operates under Chinese regulations'; which is, in 2026, something that is of concern for more than just the Chinese entries on the list, to people on my continent for starters.
'Run by one individual in Denmark.' is an interesting statement of bus factor, but I don't think that all of the other entries should be assumed to be better just because they are mute on the point. There's far less information about who is behind DNS.Watch than there is about Thomas Steen Rasmussen. And it appears that DNS.Watch went off the air at least once in recent years, so it is a legitimate concern.
Then there are all sorts of things not on this list that might matter to people, such as Quad101 looking like it has geographic restrictions on whom it is available to and Gcore being an AI company.
> 'Run by one individual in Denmark.' is an interesting statement of bus factor
I find it more interesting as a statement about organizational oversight. If there are multiple people involved in operations, they can keep an eye on each other and speak up if they see anything weird going on (e.g. a DNS resolver implementing selective logging or interfering with results). If there's only one person running the show, there's no one to call them out.
(And if you're thinking, "but so-and-so is a principled person, they would never do anything like that" - pressure from law enforcement can be a powerful thing.)
It isn't really primarily about organization oversight, though. The weird goings on are in practice usually at the behest of the people paying the salaries of all of the people involved (which includes law enforcement, which goes through corporate channels). There's no real independent oversight for that common case. Everyone is on the payroll. (-:
As a concrete thought experiment, consider if (say) a WWW/DNS hosting company providing such free proxy DNS service decided to covertly record the domain name lookups from the general public that fail in order to compile a list of domain names for the company to prospectively squat on. Having multiple employees handling the public service doesn't stop this if it is the company's actual business decision to sneakily do this.
It really is a statement of bus factor, not about oversight. To make a statement about oversight one has to take into account something else not covered by this list: which of the list entries has attempted to show some level of independent auditing or oversight of its data protection.
* https://blog.cloudflare.com/announcing-the-results-of-the-1-...
CloudFlare has had some independent auditing done, by an accountancy firm. DNS4EU holds itself subject to GDPR rules on Personal Data with respect to query data, and so is auditable by the Czech ÚOOÚ. AdGuard likewise, except that it holds Personal Data in Frankfurt. CZ.NIC likewise, except that it hasn't actually updated its legal doco since 2018 and it's only by implication that the Czech ÚOOÚ can audit the Personal Data handling under the GDPR. DNS.SB simply disclaims the existence of any Personal Data whatsoever, which as with AdGuard is overseen by the German BfDI and relevant Land authorities (HBDI for Frankfurt).
* https://legal-documents-dns4eu.s3.fr-par.scw.cloud/DNS4EU-Pu...
* https://adguard-dns.io/en/privacy.html
* https://nic.cz/files/documents/20180525_Zasady_zpracovani_os...
* https://bfdi.bund.de/EN/Home/home_node.html
* https://datenschutz.hessen.de
Even Thomas Steen Rasmussen, who also claims zero Personal Data, would be subject to oversight by the Datatilsynet.
I set up my own resolver about 2 years ago, and it has just worked. Never once had an issue.
Use your ISPs official DNS so that you get the shortest path possible from the ISPs handoff location to the CDN (and overseas trunks), not a generic DNS that doesn’t know about your ISPs layout.
ISP: 1ms to Cloudflare
Cloudflare: 10ms to Cloudflare
Thank you for your attention to this matter.
Edit: will clarify, this advice applies to countries with good privacy laws and no national surveillance i.e. not the USA
That’s no good if you want uncensored DNS.
I've been using 1.1.1.1 for performance rather than privacy. Maybe I should revisit that decision after reading this.
Does anyone have advice on how to use public wifi alongside DNS resolver?
Many public wifi network works need you to use their DNS, so they can redirect you to a gated "accept ToS" screen (and may even require re-approval every 30-60 minutes).
To resolve the issue is so frustrating:
1. realize the internet stopped working 2. ping google.com, wait for timeouts to show up. 3. try to guess if its a ISP issue, but then realize the wifi probably timed out. 4. Switch the dns. Flush DNS. 5. try to access a non-TLS domain 6. approve the gate 7. switch the DNS back
There has to be something that manages this
On macOS, you might be able to use /etc/resolver to fix this:
I did this for an internal website at my university that could only be resolved using the network name server. It just occurred to me that it might also work for the URL macOS uses to detect captive portals. We'll have to see if it works the next time I'm at a café.sudo sh -c 'echo "nameserver 192.168.1.1" > /etc/resolver/captive.apple.com'prefer this form:
echo "nameserver 192.168.1.1" | sudo tee /etc/resolver/captive.apple.com
Just put an IP address into your address bar. They're usually intercepting all port 80 traffic.
For macOS and iOS, you can create a profile to configure which DNS server you want to use at all times (including across different Wi-Fi networks and mobile data). See:
That’s what I’ve been using for years and never had any issues with public hotspots.
This is something your OS should handle as part of the OS's support for captive portals. I'd recommend contacting your OS's creator about this and filing a bug.
Happy NextDNS user. Lots of configurability, including which filterlists to enable, configurable logging etc.
Plus it’s reliable and fast from basically anywhere (which is harder to achieve if I ran my own resolvers in the cloud, and anyway I don’t want to have to maintain that).
> Happy NextDNS user
Yup, same here, especially after hears of messing around with a pihole and got tired of maintaining it. Also, NextDNS works easily with Mullvad VPN, when needed.
Yeah it’s been pretty good for me too.
I use Unbound locally as a DoH server. The Alpine Linux Unbound package is compiled with libnghttp2, required for the built in DoH listener. That's more than enough to enable ECH [1].
I pre-cache all the domains I use hourly via cron. My ISP is not going to dork with my DNS requests and their employees are bigger deviants than I. If I ever started browsing the web from a phone I would just set up my own public DoH server. It only takes a few minutes and gives me my own query logs for debugging weird issues.
[1] - https://tls-ech.dev/
I use my own public powerdns dnsdist and recurser/authoritave instances for DoH, DoT, DoQ, TCP and UDP now for ~3 years. Setup took some time, because i used bind, unbound and dnsmasq before. It's super stable and i can also use it on my mobile or legacy devices and as resolver in unbound, adguard/dnsproxy or just in my local resolve.conf.
If its public , how do you prevent others from accessing it?
To be honest, there’s no way to prevent others from using my DNS server without putting it behind a VPN or in any other non-public network. Also you can do port-knocking or something, but that's not rely authentication. However, I'm not aware of any authentication mechanisms in DNS. That would also cause performance to plummet. If you use a VPN or something, in turn, would mean you'd have to rely on someone else's DNS infrastructure. So I don't have any of this and its public.
The good thing about dnsdist is that it acts as a sort of load balancer for DNS queries and offers features such as dynamic blocking (including via eBpf) at the IP level and rules and rate limits for query types you can combine. Therefore, there are no limits (or very open limits) for all query types from whitelisted IPs, and stricter rules for all others. IPset and GeoIP banning of known malicious IPs and regions (using block-lists) also keeps the footprint of "unwanted" use very, very small.
They don’t, I guess
Why pre-cache? For speed... what is it, 30-50ms at most? If the authoritative server's TTL is <60minutes, do you force it to 3600? Do you audit all the connections that occur for every website you visit, collect all the domains hosting assets, and pre-cache those as well, or is the main site's domain the only critical one because that affects perceived latency the most?
I pre-cache for speed, verifying records that have expired since I retain the expired records for sites that have intermittent DNS issues and also to throw in domains that I do not use in the off chance someone is logging where I go and when. They will see the Cloudflare top 20K domains hourly. Myself and family members have been able to access sites when others around the internet can not due to infrastructure related DNS problems. In other words, when others will say "It's always DNS" for myself and family members that is rarely the case as DNS records do not change as often as people seem to think they do.
Or you could use dnscrypt so ISP doesn’t see your lookups at all
During the TLS handshake, you send the domain name in clear text (Server Name Indication - SNI extension) so that the hoster can present the correct certificate for that domain.
Nothing prevents the ISP from collecting that.
When all the authoritative servers support TLS I can enable TLS outbound but very few of them do at the moment. At some point someone is decrypting, turtles all the way down. I could of course just do DoT to another instance of Unbound somewhere else but I do not need to do that as my ISP does not care about my queries. I used to keep standby DoT Unbound servers around but I have never once seen a US ISP tinker with my traffic. If they did I would put up billboards saying they what they are doing.
Yours is not particularly problematic but I've always wondered how come advertising agencies allow highly controversial topics on their billboards in the US.
I know some (all?) EU advertisers deny creatives based on optics i.e. "our name and logo is on the billboard frame, we don't wanna get associated with topic X".
They like money. Controversial is not illegal. Slander is. If I purchase billboard space and spread defamation that will be problematic. The ISP could always take me to court but they would very likely lose provided I can prove I am telling the truth.
There is a bunch of public dnscrypt servers to which your client can randomly fan out encrypted queries.
There are but I will wait until all the authoritative resolvers support TLS. If I wanted to hide my traffic from my ISP then I would just use DoT from my firewall Unbound instance to a few Unbound instances I already have around the web.
Unbound has "prefetch" which will refresh near-expired cached records, and various other cache/ttl knobs. "serve-expired" seemed to work well too
I use both of those as well in Unbound.
I was thinking that if you preload your 50k list and override the min-ttl, the prefetch would let you relax the cron schedule a little
I could but I like to run everything in cron hourly to force trigger the retry mechanisms on the expired records and make a bunch of noise so that my network always looks active.
It's just a "me" thing. Others can and should do whatever they think will work for them. If everyone does this a little different that is probably best.
> I pre-cache all the domains I use hourly via cron.
How does this look? Shell script querying a list of hostnames? What qualifies as a domain you use?
It looks like this [1] I enable query logging to a tmpfs RAM disk and then every month I update a list of domains that I have queries more than {n} times. I mix that in with a list of the Cloudflare top 20K domains after removing the broken ones and some TLD's.
[1] - https://nochan.net/b/Internet-Crap/20260602-Set-Up-Your-Own-...
What would be the additional load if everyone ran a local caching recursive resolver like unbound?
It would need to be built into iOS/Android/Linux/Windows/MacOS but what would be the disadvantages?
I can see greater load on root servers but caching is specifically designed to reduce that.
I can see potential problems for CDNs and equivalent geo-based resolvers.
But are they really that bad?
To avoid hitting the root, don't send your queries there! Problem solved!
localroot.isi.edu
Bias: I created it, and am a author of one potential set of future specifications (rewrite).
Thanks, interesting, I like making my systems as stand-alone capable as possible :)
What is the primary difference between using an Unbound auth-zone (as described in the RFC) compared to localroot?
Id expect better geo performance because the geo domain is queried from the actual customer and not from some proxy that is hopefully nearby them
DNScryptProxy maintains a extensive list of public DNS servers. It also lists if if they do Dnssec, filetering, logging.
https://download.dnscrypt.info/dnscrypt-resolvers/v3/public-...
It would be nice if a site like this could offer a basic speed comparison test to your local network.
Imagine seeing response times at P90 for a series of random lookups and comparing the median response times.
Clone this repo [1] and then edit the domain names and resolvers to your liking. It will be something close to what you might be looking for.
I run an instance of smokeping locally for this purpose. It pings a variety of DNS servers (including my ISPs DNS) and several of the top websites. I periodically update my local DNS server’s upstream accordingly.
All the big DNS servers are in the 5-6ms range for me, but that hasn’t always been the case. My ISPs DNS is about the same but with crazy variance and spikes of up to 50ms, even though they should be able to be the fastest.
I always just set up root recursors at my home and other locations. I've never noticed any downside.
Same. I’ve been running my own caching DNS servers since my earliest home network, dating back almost 30 years.
The downside is obviously that uncached queries take much longer (adding >100ms) and more queries are uncached since you can't share the cache with a large user-base. Unless you just visit the same websites over and over again, this results in worse overall performance.
I've never felt this. Most large services run or delegate to anycast DNS services.
If you have knowledge of TCP, you know you will occasionally get stalls much greater than that beyond control.
the _one_ downside i've seen is on an airplane serviced by Starlink: UDP was extremely lossy to the point that whatever recursive resolver i was using at the time would mark half of all nameservers it saw as "unhealthy" and start returning NXDOMAINs to the clients before even trying to hit the authoritative NS.
Downside is privacy
Versus letting a singular entity snoop everything? If you actually open a connection to the result what is the difference? The only way to fully deal with all that is an overlay or mixnets.
quad9 seems fine. Glad there are a bunch of alternatives though. We should never stop practicing decentralization in the net.
Be cautious with Quad9; their main address (9.9.9.9) has a "malware" blacklist that has misfired several times already: twice for a private torrent tracker, once for gist.github.com, issue was resolved within minutes to hours. They have a non-filtered address (9.9.9.10), but it doesn't do DNSSEC verification. IMO they're too unreliable to be worth the hassle.
Quad9 employs DNSSEC on all endpoints now. https://quad9.net/news/blog/quad9-enables-dnssec-on-all-serv...
Was about to comment this. I actually don't like advert or malware blocking on my public DNS resolvers. It sounds cool but annoying when it misfires.
Once Quad9 blocked Halo MCC XBOX Live -> Steam achievements, several fileshare services (probably used for malware somewhere but not my usage) etc...
1.1.1.1 blocked archive.is or got blocked by them or something...
Gone back to Google DNS (gasp) for now, yes as a European... no blocking, fast, never goes down.
It's fine when it's a non default option. Like use x.x.x.x for DNS, x.x.x.y for DNS+adblocking, x.x.x.z for totalitarian corporate blocklist that doesn't let you do anything fun
I believe cloudflare only blocked archive.is on their "Families" filtered dns. I've been using their normal 1.1.1.1 and haven't encountered any blocks.
IIRC the block was on archive.today's side as a protest against 1.1.1.1 intentionally not supporting ECS.
Yesterday 1.1.1.1 failed to resolved "theinformation.com" (hosted on CF itself!) for many hours, answering NXDOMAIN.
Most important and super privacy/security related topic: DNS. Instead of choosing a public one. Host your own infrastructure. You don't need public instances. Just run ADGUARD or unbound/dnsmasq/dnsdist in recursive mode on your router or machine. And you can set limits and block-lists to your needs.
And your isp can record all your queries
Do you mean when communicating directly with a root DNS server over unencrypted UDP or TCP? You're right. There's currently no universal way to encrypt direct queries to root DNS servers. To work around this, the best approach is to host your own public DNS server outside your untrusted ISPs network and connect to it securely using DoH, DoQ, or DoT. Alternatively, you can rely on a trusted third-party public DNS provider that supports encrypted connections. In the end, there's no perfect solution. You have to choose who to trust. Personally, I trust my ISP more than external DNS providers. For anonymity you could route your DNS root queries throe tor or a VPN for the cost of performance.
I also used third-party public resolvers before. Mainly FFM (its not on the list) but non-profit, EU and encrypted. If you boil down the list (from the website) to this categories, you have 4 providers. You can trust, in my opinion. But the problem with all this provider is, that you ran quick into rate limits or some query type restrictions. Especially if you run your own mail server or other DNS expensive task.
Fun fact about hosting your own DNS infrastructure and offering it to friends and family: They might actually trust other providers more than they trust you. Even if they know and trust you personally. Because they know you can theoretically read their queries, it’s more convenient for them to have a stranger do it instead.
Your friends and family probably don't know what DNS privacy is. If they do know, they'll already be hosting their own. They will care if it works better. When my ISP fucked up DNS once I had my family use mine instead.
Should add one more filter: EDNS client subnets.
Some like cloudflare doesn’t support that in the name of privacy.
EDNS lets the dns server of the site you are visiting know from where you are connecting and can give you the closest server. 1.1.1.1 does not do that. This breaks all sorts of ISP cache and peering arrangements.
Here’s an example: My ISP’s google global cache is broken every time I use cloudflare. With google dns, opendns, isp’s own dns I get my ISP’s own ip address for the domain “googlevideo.com” which is where youtube videos load from. With cloudflare dns I get an ip address of an actual google server which may or may not be in my country. Result: my downloads from google drive/youtube/play store all are faster with a dns server with proper EDNS support.
Now imagine this on a global scale for smaller websites, your request might go to a different continent.
I understand the product decision for cloudflare and I don’t want them to change but this is something people should know about. There are numerous reports on their forums which are always locked with no activity.
I am not saying it’s a conspiracy but this doesn’t affect sites on cloudflare btw due to their global anycast routing/infra setup which I don’t know enough to explain.
There's some anti-competition going on there too - Cloudflare's own CDN uses anycast, which doesn't need geo-DNS, but some of their competitors use geo-DNS, so Cloudflare actually prefers that geo-DNS is broken.
CTRL-F "ECS: Yes"
Interesting puzzle on the top level url… what’s that all about ?
Google's AI Mode was pretty effective at solving it. I'm impressed. I just copied and pasted the two lines.
Shame there is no client subnet filter. I've had issues in the past with various websites when using resolvers that don't add that hint.
Why cloudflare is listed under maximum privacy?
9.9.9.9 with 1.1.1.1 as secondary
I use 9.9.9.9 but it failed me a couple of times in the past two months. Cloudflare is very robust but I just don't like them. Falling back on them silently is not what I want. I am rather using them directly when quad9 fails.
Random, but I don't understand why anyone would choose a "block ads and trackers" DNS server as a default.
Even if it's configuring something for boomer family, that sounds like a recipe for "why is this website not working"?
Because it is very useful on mobile. App typically use an advertising SDK for their monetisation, which means we can BLOCK THEM ALLLLLLL
Because to me even as an IT person it sounds like a good idea on the surface. To have no connections to/form ads, malware, c2.
But yes, then you happen upon your first false positive.
And you switch back to a non filtered DNS OR one that you can whitelist or control, still annoying.
unfortunately many DNS resolvers are integrated with CDNs. I do want privacy of an independent non-tracking DNS but I also want my video streaming work fast. :(
What does it mean for a DNS resolver to be "integrated with CDNs"? And why does that affect streaming speed negatively?
Some CDNs (like Cloudflare) use solely BGP anycast steering for routing to the "nearest" server. Other CDNs (like Akamai, Fastly, Netflix, and YouTube) use a hybrid BGP-DNS steering because some ISPs have extremely questionable routing practices.
Unfortunately, if the CDN only rely on BGP steering (or conversely if you are a user who is stuck on an ISP monopoly), there are cases where this is not necessarily the nearest network-wise (or performant network-wise) if there are peering disputes. If the said ISP is a virtual monopoly or (worse) state-sanctioned to collect network "toll fees" (like in South Korea), non-preferred and international routes are (intentionally) congested.*
If you use a third-party DNS, you basically lose this DNS optimization, and ECS does not fully solve this (because sometimes the DNS override are placed only on the ISP's recursive DNS servers). You're basically in a lose-lose position: either use third-party servers and the IP addresses served to you on popular CDNs are in the congested path, or use the often-unreliable and heavily-logged ISP-provided DNS.
* Usually. There are exceptions, but this comment is just a simplification of the complexities of real-life networking (where RFCs and mutual cooperation die out without fanfare).
Edit for further reading: DNS is the new BGP by Geoff Huston of APNIC (https://ispcol.potaroo.net/2023-09/service-routing.html), How LinkedIn used PoPs and RUM to make dynamic content download 25% faster from the old LinkedIn engineering team (Archived at https://web.archive.org/web/20160310065302/https://engineeri...), Wikimedia's mapping of their CDNs (https://gerrit.wikimedia.org/r/plugins/gitiles/operations/dn...)
I would be curious if you could provide any examples for the issues you cite. They sound plausible to me, especially around peering disputes or in various Asia countries, but I wonder how in practice this looks in like a traceroute for the amount of added latency etc.
I would suspect some of non-optimized scenarios are eyeball network operator decisions on their networks that DNS providers and others do not have much control over. Like, Cloudflare resolves an IP that is closest to them, which is likely also the closest to the end user (and the eyeball ISP), but the eyeball ISP BGP path to that resolved IP takes a roundabout path because of their own BGP policy because $reasons.
There should be examples under the links I have added to the original comment. Unfortunately, I cannot give examples that I personally encountered (first, NDA, sorry, second, the ISPs would probably be very incensed to me), but browsing BGP collector sites would probably illuminate you, like this one (https://bgp.tools/prefix/41.189.185.0/24#whois, https://bgp.tools/prefix/41.189.185.0/24#dns) for caching Facebook and other Meta stuff, and this one (https://bgp.tools/prefix/2001:918:ffad::/48#whois) is for Akamai.
ControlD is pretty cool.
jabberwocky !
ok now add benchmarking a-la https://www.grc.com/dns/benchmark.htm to rank them on performance for your specific region etc.
note on privacy: if you are using port 53 you are cooked so make sure you are using dns-over-tls or dns-over-https.
9.9.9.9 is all you need