Table of Contents

When it comes to decreasing your website’s load times, your DNS and how quickly it responds are often overlooked.

Without it, users would need to remember the long string of numbers of your IP to visit your website instead of a user-friendly address.

Since Google’s research indicates your website’s bounce rate can increase by 32% if it loads between one and three seconds, it’s essential to shave off as much time as possible from page load speeds.

Today, I’ll share more details on DNS testing and how you can run your DNS response time test to see if you can improve the performance of your DNS and website’s speed.

What is a DNS?

Domain Name Servers (DNSs) are like phone books for websites, linking them to their IP addresses. In turn, a DNS lookup is the process of finding the correct IP address for a given website URL. 

Domain names such as “” require the assistance of DNS servers to translate the domain name into a numeric IP address so that users can access the right site.

How do DNS Servers Work?

Understanding how DNS servers work might help troubleshoot when you have DNS problems. For example, a number has a name and a number attached to it. The name is what people type into a browser to access a site, such as our website 

Numbers or IP addresses are associated with that domain name and indicate the location of the website on the internet. A DNS server’s job is to tie the name to the number.

When a website’s name is put into the browser, it queries the nearest DNS server for its IP address. When the DNS server delivers the IP address, the browser connects to the webpage, which shows on your screen. Unfortunately, end users are unaware of the necessary background processes to keep the system running.

If the DNS server is unavailable, the browser cannot get the website’s IP address and returns an error. Because it takes seconds for the news to spread, everyone knows the server is down.

DNS Lookup Journey. Source

Here’s a quick step by step process of how it works once you type in the domain name you want to visit:

  1. Requesting website information.
  2. It contacts the recursive DNS servers
  3. It looks for the authoritative DNS servers, or it looks elsewhere
  4. Access the DNS record
  5. Returns the record to your computer to your browser

And entire DNS process takes only milliseconds to complete, and as a site owner, you want to reduce DNS lookup as much as possible.

Two Methods And Two Very Different Tests

The two methods are:

  1. Ping test
  2. Dig  test

Site owners and developers commonly run ping tests to measure the average time for a site to load.

While these tests give helpful information, they are not always trustworthy.

Some servers consider pings to be unnecessary and do not respond to them. Unfortunately, when this occurs, you will be unable to generate data on how fast your site loads.

Ping tests also don’t always disclose how quickly your DNS responds and fetches the IP address needed to load a page.

This is when the BIND tool comes into play.

It may be used to execute a DIG (Domain Information Groper) command to get your actual DNS response time.

It comes with Mac and may be downloaded and installed on Windows.

Using dig to test DNS server response time

The DNS response time results show just one metric from your computer, and it is essential to conduct your tests from other locations to get more accurate findings. You may run further tests using Google’s Public DNS. 

To run a DIG command and DNS response time test, go to your Applications folder on Mac and open the Terminal app.

For Windows, go to Start > Run, enter “cmd” (without the quotation marks) into the field, and press Enter on your keyboard. Then, click on Command Prompt to open it.

Next, type in the command in the link below, but don’t forget to replace “” with your actual domain before pressing Enter on your keyboard:

time dig 

Furthermore, you must enter the command in the link below, but remember to change your site’s domain with your actual domain before pressing Enter.

In this case, we’re showing a result similar to the one shown below for the DNS response time test performed for Google. The real-time is recorded in minutes, then seconds, followed by a period and milliseconds during the test. 

The query time is recorded to determine how long it takes for your computer to execute the command, whereas the real-time determines how long it takes for your computer to contact your site’s DNS.

Using dig to test DNS server response time on mac
DIG command and DNS response time test on Terminal App via Mac OS

The results are identical to the previous commands, and you can get DNS response time by subtracting the real-time from the query time.

Digging Deeper into a DNS Response Time Test

The resulting DNS response time test shows only one metric from your computer. To get more accurate results, you must run tests from different locations.

You can use Google’s Public DNS, for example, to run more tests.

Go back to your Terminal app or Command Prompt and enter the following command:

Don’t forget to replace “” with your actual site address.

The results are similar to the previous command, and you can subtract the real-time from the query time to get the DNS response time.

You know how to test DNS server response time using the DIG command, but how reliable are your results, exactly?

The Problem When You DIG for Results

While the BIND tool and DIG commands are helpful, there are some caveats.

Have No Fear, You’re (Probably) in the Clear

Lighting-fast DNS speeds are significant, but that’s not the only factor you should consider when trying to improve your site’s performance.

Many DNS options out there are sufficient. So unless you’re experiencing an alarmingly large DNS response time close to or much longer than a second for a small to medium-sized site, you’re probably in the clear.

Although, this isn’t a hard and fast rule. Each site is different. It’s up to you to decide what’s an appropriate DNS response time since it will vary based on the purpose of your website.

As Valuable as Your DNS’s Speed

How quickly your site’s DNS performs isn’t the only factor you should consider. What’s equally critical is that your DNS is secure and reliable, and your provider acts ethically, professionally, and takes your privacy seriously.

If security and privacy aren’t a priority for you, they should be since hackers can cause many issues for your site’s speed.

For example, they could inject scripts that add spam to your site that increases load times or redirect your domain to point to their spam, malware, or phishing website.

Hackers could redirect your domain to their phishing site compromising security and privacy.

If your DNS isn’t reliable, it could be slow one minute, then fast another, and your visitors could get downright annoyed and decide to leave your site altogether.

Similarly, your hosting provider should also help you with any DNS issues courteously and quickly. Otherwise, you could struggle with your site’s speed for the long haul.

Possibly Skewed Results

The DIG command does a DNS lookup, but only from your computer or another DNS of your choosing.

Depending on how close your site’s DNS is to your computer or the DNS you used to run the test, you may not get accurate results for how your users experience your site’s speed.

If you’re located near your DNS and server, you’re going to get much faster response times than a user from the other side of the world and vice versa.

Not every one of your users will likely visit your site from your location. Unfortunately, that means some of your site’s visitors may experience higher or lower response times depending on how far they are away from your site’s DNS and server.

Getting results from only one or two different DNS locations isn’t going to provide an accurate overview of the average DNS response time for your site.

Ideally, Google’s Public DNS would be located on the opposite side of the world from your computer’s location, and your site’s DNS would be located near either you or the public DNS.

In that case, your results wouldn’t be as limited.

But, this may not be the case.

Fortunately, there are automated tools you can use to get more accurate results when you test DNS server response time.

Tools to Test DNS Server Response Time

Both of the tools listed here are free to use and do not need any software installation. They are both dependable and secure, and they provide complete reports after each DNS response time test.


DNSPerf website

The DNSPerf tool performs real-time checks from over 30 locations to provide a comprehensive picture of how well your DNS performs worldwide.

Each location is marked with the amount of time it took your DNS to reply, and bad timings are highlighted in yellow as a warning or in red to indicate significant speed difficulties.

The results are given in list form and on a map for clarity.

DNSPerf map dns vieew

Probably the best tool, and that looks great. But you can also scroll down and see the list of locations and response times:

DNSPerf result list


DotCom-Tools website

The DNS lookup test from DotCom-Tools asks root servers to obtain DNS lookup records that specify the path followed to acquire authoritative DNS server data. The IP addresses associated with the requested DNS record are returned by the DNS server. If IPv4 and IPv6 addresses are available, the DNS trace test will attempt to resolve them automatically.

The ability to choose the countries you want to test a page’s load and response time on is an excellent option if you’re testing a specific area for your business. The time it takes to obtain a response from each node along the path, and the responses given from each node are included in the test results.

DotCom-Tools results

GRC DNS Benchmark

GRC DNS Benchmark is a standalone tool provided for Windows and Linux to test local and remote name servers. You can compare the performance and reliability of up to 200 DNS resolvers with Cached/uncached/dotcom lookup. View the findings in tabular or graphical form or export the results to CSV format.

GRC DNS Benchmark

Wrapping Up

In certain circumstances, shaving milliseconds – or seconds – off your DNS response time might drastically reduce your site’s load times. It will also aid in the improvement of the Largest Contentful Paint (LCP) grade, which is one of the Core Web Vitals.

A DNS response time test using the DIG command can help you identify whether your DNS is operating properly or whether it needs to be improved.

In any case, you’ll know if your DNS speed is enough.

Do you test the response time of DNS servers? Have you considered your DNS while reviewing the overall performance of your site?

Comments (6)

After performing the DNS response time test, is there a specific range or cap you would ideally like to see for results? Ours came in at 81 msec query time, and 114 msec real time, which resulted in a 33 msec DNS response time. Thanks

What an odd article. Dig doesn't come with windows and why am I having to go to a link to view the commands?

Strange dayz..

I think there is a little conversion failure here:

"It may be important to note that if one of the results is in seconds and the other is in milliseconds, you need to first convert the one result from seconds to milliseconds.

You can do this by multiplying the time in seconds by 60."

Isn't a second 1000ms and not 60ms?!

Thank you Jenni for this useful article on DNS. If you identify an issue with DNS, how would you go about improving that? Is it only the hosting company we can talk to or are there other things we can do? Grateful for any insight you could give here, thank you : )

Hey everyone,

I have some replies to answer your questions.

Jonathan: A DNS server response time of 33 ms is respectable. Unless you're running a huge site like Twitter, or Facebook, you're good to go.

Ryan: The links were a temporary glitch, and it has been fixed now.

Bernhard: Oops! I had minutes on the brain when I wrote that. It has been fixed now. Thanks for letting us know about it.

Dave: A post on server performance, and what to look for from a hosting provider will be published soon. It should have the details you're after.


Jenni McKinnon

DNS response times have absolutely nothing to do with how fast your site is and is completely out of your control as a site owner or hoster. DNS response time ONLY tells you how quickly the typed address is converted to the matching IP address by the DNS server that the client uses. So no matter how fast or lightweight or awesome your site is, a slow DNS at the client will still result in a slow visit the very first time that client visits your site. Subsequent visits will be faster because the DNS info is cached locally, again at the client. From the site's perspective you have ZERO control.

Related Articles of Page speed and caching
Subscribe to Our Newsletter

Stay in the loop with the latest WordPress and web performance updates.
Straight to your inbox every two weeks.

Get a Faster Website
in a Few Clicks

Setup Takes 3 Minutes Flat
Get WP Rocket Now