How to Test DNS Server Response Time to Troubleshoot Site Speed

0 Shares
0
0
0
0
0
0
0

USING DIG TO TEST DNS SERVER RESPONSE TIME

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 “your-site.com” with your actual domain before pressing Enter on your keyboard:

time dig your-site.com

You should receive a result similar to the one below for my website DNS response time test:
Screen Shot 2020-01-02 at 4.07.03 PM.png
The two key components to note are query time in milliseconds in the example above
The real-time is noted as minutes, then seconds, followed by a period, and the milliseconds after that.
The query time is how long it took for your computer to execute the command. The real-time indicates how long it took for your computer to reach your site’s DNS.
Now, you need to solve a quick math problem to get the actual time it took to get a DNS response.
Subtract the real-time from the query time to get how long it took for the DNS to respond.
In the above example, the query time is 38 ms and the real time is 118 ms. The result of the DNS response time test is 80 milliseconds.
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 1000.

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, it’s crucial you 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:

time dig @8.8.8.8 your-site.com

Don’t forget to replace “your-site.com” with your real site address.
for more details click here