Using dig to Query a Specific DNS Server (Name Server)

There may be occasions when you wish to query a name server directly.  I usually do it when debugging DNS servers configuration for a domain that is experiencing difficulties.

I recommend that anyone running DNS services (in cluster mode or standalone) to looks into the following tool. It is very useful, especially when you’re debugging.

My tool of choice (available on Linux, OS X and BSD) is dig

dig has a feature which allows you to specify a name server along with the record you want to query.

For example, DNS servers for google.com are:
ns1.google.com
ns2.google.com
ns3.google.com
ns4.google.com

We may query a random NS by issuing the following command:
dig google.com

We can query a particular server directly by doing the following:
dig google.com @ns1.google.com

Feel free to open a support ticket if you would like us to perform it for you.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What are .htaccess files and how to create and edit them

.htaccess files are used to configure and provide the server with instuctions regarding the...

How to install a custom BIN on CloudLinux (with CageFS)

CageFS creates a filesystem template in /usr/share/cagefs-skeleton directory. CageFS template...

10 Points Server Maintenance Checklist

Server Maintenance Checklist Just like any other computer, Linux servers need periodic...

Recommended firewall

What firewall do you recommend to secure my Linux server? MACI recommends the CSF (ConfigServer...

[WHM/cPanel] Update WHM/cPanel using CLI

Occasionally, WHM or cPanel might experience errors that can only be resolved by updating the...