Skip to main content
guides

How to find the fastest DNS for your region

· 5 min read

In short

The big public resolvers are anycast: they answer from the node closest to whoever's asking, so the fastest one for you depends on where you are and who your ISP is. The only way to know is to measure from your own connection, and the speed test takes two minutes. From Madrid, Cloudflare, Quad9, CleanBrowsing and DNS4EU answer in 5 or 6 milliseconds when the answer is cached; from your city the order may be different.

“Which DNS is best for my area” is one of the searches that brings the most readers to this site, and the honest answer is that nobody can tell you from the outside. What we can do is explain why, and show you how to measure it yourself in two minutes.

Why there’s no universal answer

Cloudflare, Google, Quad9 and the other big resolvers run on anycast: the same address, say 1.1.1.1, is announced from hundreds of nodes around the world, and your query lands on whichever one your ISP’s network considers closest. “Closest” in routing terms, not kilometres. Two neighbours in the same city on different ISPs can be talking to different nodes, one at 6 ms and the other at 40.

Then there’s caching. If the domain you’re asking for was resolved a moment ago on that same node, the answer comes back instantly. If not, the resolver has to walk the whole chain up to the authoritative server, and there the quality of the provider’s network matters more than distance. That’s why a good measurement separates the two: cached queries and cold queries.

How to measure from your connection

The quick option is the DNS speed test. It runs five rounds of queries against seven resolvers from your browser, using random names so none of them can answer from cache, and ranks them by average latency. Nothing to install, nothing stored.

Two tips so the result is worth something:

  • Run it from the network you actually use, not from your phone on mobile data if what you want to configure is the home router.
  • Run it again at a different hour. ISP networks get congested in the evening and the order can shift.

If you prefer a terminal, dig gives you the same information with no middleman:

dig @1.1.1.1 example.com | grep "Query time"
dig @8.8.8.8 example.com | grep "Query time"
dig @9.9.9.9 example.com | grep "Query time"

The first query to each resolver usually takes longer because it fills the cache; repeat each line two or three times and keep the stable figure. On Windows, nslookup doesn’t show timings; use the browser test or Measure-Command in PowerShell.

What counts as a good number

  • Under 20 ms: excellent. That’s what you see when the resolver has a node in your city or the next one over.
  • 20 to 50 ms: perfectly normal. You won’t notice a difference from the tier above while browsing.
  • 50 to 100 ms: acceptable, but it starts to show on pages that load resources from many domains.
  • Over 100 ms: there’s almost certainly a better one for you.

And one figure that matters more than latency: loss. A resolver that answers in 8 ms but fails to answer 10% of queries is worse than one at 25 ms that always answers, because every lost query is a second or two of waiting until the system retries. In our measurement from Madrid, DNS.WATCH dropped 77% of queries and Comodo 42%; neither is an option no matter how fast they answer when they do.

What we measured from Madrid, as an example

With the answer cached, Quad9 responded in 5 ms and Cloudflare, CleanBrowsing, DNS4EU and xdp.es in 6, all from Telefónica’s network. Google in 7. Cold, forcing full resolution, Cloudflare dropped to 22 ms and the rest sat between 30 and 35, except the small or heavily filtered resolvers, which went past 100.

That table describes one network on one day. If you’re in Madrid on Telefónica it’ll serve you; if you’re in Lima, Berlin or Riyadh, it’s only a reference for what a good figure looks like.

What changes by region

Europe. The big players have nodes in nearly every capital and the gaps between them are a few milliseconds. DNS4EU is the European public resolver and answers as fast as Cloudflare from Spain. If you’re in Spain, xdp.es has its servers in Madrid.

Middle East and North Africa. This is where the question reaches us from most, and for good reason: node coverage varies a lot by country, and each ISP’s peering agreements change the result even within the same city. Cloudflare and Google have a presence in the Gulf and in Egypt, but whether your ISP takes you to that node or to one in Europe is up to the ISP. Here measuring isn’t advice, it’s the only way.

Latin America. Similar story: nodes in the big capitals and a lot of variation between ISPs. Cloudflare often comes out first, but don’t assume anything.

Russia and Asia. Local resolvers (Yandex DNS in Russia, AliDNS in China) usually beat the Western ones on latency through sheer network proximity. The test includes AliDNS so the comparison is fair from there.

A common trap: your ISP intercepts DNS

If every resolver in the test shows almost the same time and the same results, be suspicious. Some ISPs intercept DNS traffic on port 53 and answer it themselves, regardless of which address you’ve configured. You’re not measuring Cloudflare, you’re measuring your ISP with Cloudflare’s address typed in.

The browser test uses DNS over HTTPS, which can’t be intercepted that way, so its figures are the real resolver’s. If this happens to you, setting up DoH or DoT on your system is how you make sure the DNS you choose is the one actually serving you.

Primary and secondary

Once you know which one is fastest, make it the primary. The secondary is only used when the primary doesn’t answer: it’s not load balancing, so pairing “the fastest with the safest” hoping for the best of both doesn’t do much. Use two from the same provider, or the fastest and the next fastest. The configuration guides show where each one goes on Windows, macOS, Android, iOS and the router.

Frequently asked questions

What is the fastest DNS in the world?
None of them is fastest everywhere. Cloudflare, Google and Quad9 have nodes in hundreds of cities, but which one answers first depends on your network and on the exchange point your ISP routes through. Measure from your connection instead of trusting a ranking.
What is a good DNS latency?
Under 20 ms is excellent and 20 to 50 ms is perfectly fine. Above 100 ms you start noticing delays when opening sites. Between two resolvers at 8 and 12 ms you won't feel a difference; what you will feel is one of them dropping queries.
How do I measure DNS speed without installing anything?
With the DNS speed test on this site, which queries seven resolvers from your browser in five rounds and ranks them by latency. If you prefer a terminal, dig @1.1.1.1 example.com shows the lookup time on the Query time line.
Is my ISP's DNS the fastest because it's closest?
Sometimes on latency, but it usually loses on reliability: it falls over under load, over-caches, or redirects non-existent domains to an ad page. Measure it alongside the others and compare packet loss as well.

← All articles

Ready to improve your DNS?

Choose the best free DNS server for your needs and configure it in minutes.