How to Find the Fastest DNS Server for Your Connection

Learn how DNS resolution affects browsing speed, why cached and uncached lookups differ, and how to benchmark and switch to a faster public DNS resolver.

Updated September 29, 2026 6 min read

Use the free DNS Speed TestCompare Cloudflare, Google and AliDNS response times, cached and uncached

Before your browser can download a single byte of a website, it has to turn the site's name into an IP address. That lookup goes to a DNS resolver, usually your ISP's by default. If the resolver is slow, overloaded or far away, every new site you open starts with a pause. Swapping resolvers is free and takes minutes, but only helps if you pick one that is actually faster from where you are.

This guide explains what a DNS resolver does, why "cached" and "uncached" speed are different questions, how to benchmark the major public resolvers from your own connection, and how to switch safely on your router, computer, phone or browser.

How a DNS lookup works

When you type example.com, your device asks a recursive resolver for the address. The resolver then:

  1. Checks its cache. If someone recently asked for the same name, it answers immediately.
  2. If not, asks the root servers which servers handle .com.
  3. Asks the .com servers which name servers are authoritative for example.com.
  4. Asks those authoritative servers for the actual record, caches it for the time the record's TTL allows, and replies to you.

Your device and browser also keep their own small caches, so only the first lookup of a name in a while pays the full cost.

Two kinds of speed

  • Cached speed mostly reflects the network distance between you and the resolver. Popular names like large search engines and social networks are almost always cached.
  • Uncached speed reflects how quickly the resolver can do the full chain above for a name nobody has asked about recently. That depends on the resolver's own network and how close it is to authoritative servers.

A resolver that is very close to you but slow at uncached lookups can still feel sluggish on less popular sites.

Benchmark public resolvers from your connection

The DNS Speed Test compares Cloudflare (1.1.1.1), Google Public DNS (8.8.8.8) and AliDNS (223.5.5.5) from your location.

  1. Open the DNS Speed Test page and read the What is measured: note.
  2. Choose the Rounds per resolver. More rounds give steadier medians at the cost of a longer test.
  3. Press Start DNS speed test. Resolvers are queried in rotation each round, so a brief network hiccup affects all of them equally. Press Stop to end early.
  4. Compare the Cached (median) and Uncached (median) columns. The fastest overall is ranked first.
  5. Check the Failed column. A resolver that times out or is blocked on your network (common on some school and office networks) is not a good choice, however fast its successful replies were.
  6. Note the First query time. It includes opening the encrypted connection to each resolver, so it is shown for information but excluded from the ranking.

How uncached lookups are forced

For the uncached test, the tool asks for a random subdomain that has never existed before, such as x7k2q9ab.github.com. No resolver can have that in cache, so it must contact the domain's authoritative servers. That gives a fair measure of real resolution work.

An important limitation

Web pages cannot send classic DNS packets on port 53, so all queries use DNS over HTTPS (DoH). The results match what you would get by turning on secure DNS in your browser, and are a good guide to plain DNS from the same provider, but the numbers will not be identical. The test also cannot measure your ISP's resolver, which usually only accepts classic DNS.

Other ways to benchmark

Desktop benchmarking utilities can send classic DNS queries on port 53 to any resolver, including your ISP's, and test dozens at once. If you want to include the ISP resolver in the comparison, one of those is the better tool.

In a terminal, dig (macOS and Linux) prints a "Query time" for each lookup:

dig @1.1.1.1 example.com
dig @8.8.8.8 example.com

On Windows, nslookup example.com 1.1.1.1 works but does not show timing; PowerShell's Measure-Command { Resolve-DnsName example.com -Server 1.1.1.1 } does. Run each several times and ignore the first result.

How to switch DNS resolver

On the router (whole network)

Log in to the router's admin page and look for DNS settings under WAN, Internet or DHCP. Enter the primary and secondary addresses of your chosen provider. Every device that gets its settings from the router will use them after reconnecting.

On Windows

Open Settings, Network & internet, choose your connection, and edit the DNS server assignment to manual. Recent versions of Windows also let you enable DNS over HTTPS for supported providers there.

On macOS

System Settings, Network, choose your connection, Details, then DNS. Add the new servers and move them to the top of the list.

On Android and iPhone

Android's Private DNS setting takes a DNS-over-TLS hostname from your provider. On iPhone, per-network DNS can be set under Wi-Fi settings, or system-wide encrypted DNS can be installed through a configuration profile or app from the provider.

In the browser

Chrome, Edge and Firefox each have a secure DNS or DNS-over-HTTPS setting in their privacy or security settings, where you can pick a provider. This affects only that browser.

What a faster resolver will and will not do

  • It reduces the pause before a new site starts loading, typically by a few to tens of milliseconds per lookup.
  • It does not change download speed. Bandwidth is measured with the Internet Speed Test.
  • It does not fix lag in games, which is about latency to the game server; use the Ping Test for that.

Resolvers also differ in privacy policies and features such as malware filtering. Read the provider's policy, not just the benchmark.

Troubleshooting

One resolver fails completely

Some networks block public resolvers or DoH endpoints to enforce their own filtering. Use the network's resolver there, or ask the administrator.

Results change between runs

Resolver performance varies with time of day and routing. Run the test at different times, and prefer the resolver that is consistently good rather than occasionally fastest.

A domain still resolves to an old address

That is caching, not speed. Records are cached for their TTL. After changing a record, check what different resolvers return with the DNS Lookup tool, or across locations with the DNS Propagation Checker.

Frequently asked questions

Which DNS server is the fastest?

It depends on your location and ISP routing, which is why testing from your own connection matters. Cloudflare and Google are fast in many regions, and AliDNS is often fastest in and near China.

Is it safe to change my DNS server?

Yes, if you choose a reputable provider. You are trusting that provider with the list of domains you visit, so read its privacy policy.

Why does the first query take so long?

It includes setting up the TCP and TLS connection to the resolver. Later queries reuse the connection, which is why the tool excludes it from the ranking.

Should I use the same DNS on every device?

Setting it on the router is simplest and covers everything. Browser-level secure DNS can override it for that browser only.

Does the test send my browsing history?

No. It only looks up popular domains and random subdomains of them. Each resolver sees your IP address, as with any connection.

Try it now: DNS Speed Test

Loading tool…