ThisCalculator

Everyday

Test DNS Speed: How to Measure & What It Means

Updated · Standard formula, shown below

Test DNS Speed: How to Measure & What It Means

To test DNS speed, you measure how long it takes a DNS resolver to answer a query, typically in milliseconds (ms). You can do this with free command-line tools like dig, nslookup, or resolvectl, or with online utilities that run queries from your location. The result tells you how responsive a DNS server is, which affects how quickly your browser can start loading a website after you type its name.

Why DNS Speed Matters

Every time you visit a website, your device must first translate the human-readable domain name (like example.com) into a numeric IP address. That translation is done by a DNS resolver. If the resolver is slow, you’ll notice a delay before the page even begins to load—often called “DNS latency.â€� While a single query might take only tens of milliseconds, the cumulative effect on a browsing session with dozens of requests can be noticeable.

DNS speed is not the same as internet bandwidth. You can have a 1 Gbps fiber connection, but if your DNS resolver takes 500 ms to respond, every new domain you visit will have a half-second delay. This is especially important for:

  • Web browsing (especially on mobile networks with high latency)
  • Online gaming, where every millisecond counts
  • IoT devices that make frequent small requests
  • Developers and sysadmins who rely on fast API calls

How DNS Resolution Works (Briefly)

When you type a URL, your device sends a query to a recursive resolver (usually provided by your ISP or a third-party like Google, Cloudflare, or OpenDNS). That resolver may have the answer cached, or it may need to query a chain of authoritative servers. The time it takes to get the final answer is the resolution time. The resolver’s location, its cache hit rate, and the distance between your device and the resolver all affect speed.

Most operating systems also cache DNS responses locally, so repeated visits to the same domain are much faster. A “cold� query (first time) is the true test of resolver speed.

How to Test DNS Speed (Command Line)

Here are the most common methods, with examples for Windows, macOS, and Linux.

1. Using dig (Linux/macOS)

Open a terminal and type:

dig @8.8.8.8 example.com

Look for the “Query timeâ€� line in the output. That’s the time in milliseconds for that single query. To test a different resolver, replace 8.8.8.8 with any DNS IP (e.g., 1.1.1.1 for Cloudflare, 9.9.9.9 for Quad9).

2. Using nslookup (Windows/macOS)

In Command Prompt or PowerShell, type:

nslookup example.com 8.8.8.8

It will show the server and the address, but not the query time. To get timing, use nslookup -debug example.com 8.8.8.8 and look for the “round-trip time� in the verbose output.

3. Using resolvectl (Linux with systemd)

resolvectl query example.com

This shows the resolved IP and the time it took, but it uses the system’s configured resolver, not a custom one.

For a more comprehensive test, you can run multiple queries and take the average. A single query can be affected by network jitter, so a few repetitions give a better picture.

What to Look For: Good vs. Bad DNS Speed

There is no universal “good� number because it depends on your location and network. However, general guidelines:

  • Under 20 ms: Excellent, typical for a well-optimized resolver close to you.
  • 20–50 ms: Good, acceptable for most uses.
  • 50–100 ms: Noticeable, but often tolerable.
  • Over 100 ms: Poor, likely causing visible delays.

Remember that a resolver’s speed can vary by time of day and by the domain being queried. A resolver that is fast for a popular domain (cached) may be slow for a rare domain (requires a full recursive lookup).

How to Choose the Fastest DNS for You

Instead of testing manually, you can use a free tool like dnslookup or the namebench utility (though it’s older and not updated). The most reliable method is to test several public resolvers from your own network using a script that queries a set of common domains (like google.com, youtube.com, facebook.com) and averages the times.

Here’s a simple bash loop to test three resolvers:

for dns in 8.8.8.8 1.1.1.1 9.9.9.9; do
  echo "Testing $dns"
  for domain in google.com youtube.com facebook.com; do
    dig @$dns $domain | grep "Query time"
  done
done

Compare the averages. Also consider reliability and privacy: some resolvers log your queries, others don’t. Speed is only one factor.

Common Mistakes When Testing DNS Speed

  • Testing from a different network: Your home network may have different latency to a resolver than your office. Always test from the network you intend to use.
  • Ignoring cache: If you test the same domain twice, the second query will be answered from cache, giving a false impression of speed. Always use a fresh domain or clear your local cache.
  • Using a single query: Network jitter can make one query look great or terrible. Run at least 5–10 queries and take the median.
  • Confusing DNS speed with connection speed: A fast DNS test doesn’t mean your internet is fast. It only measures one small part of the whole request.

Online DNS Speed Test Tools

If you prefer a graphical interface, several websites offer DNS benchmark tests. They typically run from your browser, but they actually use a server-side script to query different resolvers from the server’s location, not yours. That’s a significant limitation: the result may not reflect your actual experience. Some tools (like the “DNS Benchmarkâ€� app for Windows) run locally and are more accurate, but they are not web-based. For a quick check, a command-line test is more reliable.

Frequently Asked Questions

What is a good DNS speed?

Generally, under 20 ms is excellent, 20–50 ms is good, and anything above 100 ms is likely to cause noticeable delays. But the “best� DNS for you depends on your location and network path.

Does changing DNS improve gaming?

It can reduce initial connection delays, but it won’t lower your ping to the game server. Once the connection is established, DNS is no longer involved. For gaming, a fast DNS can help with login and matchmaking, but not with in-game latency.

Why is my DNS slow even with a fast resolver?

Your ISP’s routing might be inefficient, or your local network could have issues (e.g., Wi-Fi interference). Also, if you’re using a VPN, your DNS queries may be routed through the VPN server, adding latency.

Can I test DNS speed on my phone?

Yes, you can use apps like “DNS Speed Test� or use the command line if you have a terminal emulator. However, mobile network latency can vary, so test multiple times.

Is it safe to use public DNS like 8.8.8.8?

Yes, it’s generally safe. Google, Cloudflare, and Quad9 are reputable providers. However, be aware that they can see your DNS queries, so if privacy is a concern, choose a resolver with a no-logging policy, like Cloudflare’s 1.1.1.1 or Quad9.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.