I have two dns servers configured, which are listed when viewing ipconfig /all

I would like to know which of the two servers I am using at the current time i.e. from my browser or via the tracert command. I believe that I will be using the first listed server unless it is unavailable at which point I will be using the next one.

I am trying to find out if there is a command I can use which will tell me which one I am using, or alternatively an explanation as to why this is a flawed question.

I'm aware of ipconfig /displaydns but this is a cached result listing, which also doesn't show which server each result came from.

I'm aware of nslookup [host] but this uses the current "default" server.

I'm aware of nslookup [server] [host] but this doesn't help with confirming which dns I am currently using from tracert or browser.

My question comes from a situation where nslookup will give me the expected result for a particular internal host. Simultaneously, my browser, and also tracert are unable to resolve the host. If tracert and my browser are using the secondary dns server, I'd like to be able to confirm that.

Is there a way to do this?


7 Answers 7


Windows queries DNS in this order:

  1. Hosts file
  2. Local DNS cache
  3. Preferred DNS servers
  4. Other DNS servers (Secondary, Tertiary, ...)

You can find out more about this behavior over at Microsoft (How DNS query works, Client features). Additionally, there's also a list of timeouts for DNS requests:

Value        Default Value  Attempt
1st limit    1 second       Query the preferred DNS server on a preferred connection.
2nd limit    2 seconds      Query the preferred DNS server on all connections.
3rd limit    2 seconds      Query all DNS servers on all connections (1st attempt).
4th limit    4 seconds      Query all DNS servers on all connections (2nd attempt).
5th limit    8 seconds      Query all DNS servers on all connections (3rd attempt).
6th value    (Must be 0.)

Windows may log a DNS query timeout somewhere in the Event Viewer, I'm not sure about that. Wireshark mentioned by @BBlake probably is your best bet to quickly get your answer.


I guess the best solution is to go to dnsleaktest and click on Standard test. I use this method personally all the time.

Edit: Another method that I've recently started using is Cloudflare's DNS help page. Here, you can see the DNS server being used next to AS Name.

  • 2
    This was perhaps the best and easiest way without installing an external utility. Thank You!
    – Ankur Jain
    Commented Feb 20, 2017 at 12:31

The nslookup command from command prompt will tell you which one it is using (typically your primary). Sometimes typing in a fake domain (hdhsgdh.com) will fail on the first dns server and attempt to use the second.

A quick edit: don't type an address after The nslookup command, it will tell you which dns server it is using.

  • 1
    nslookup always shows the default DNS server. Commented Jan 9, 2016 at 14:53

I am not aware of any easy way built in to Windows to track this information. However, a utility such as Wireshark makes it fairly easy to track your network traffic and filter by specific kinds of traffic, such as DNS.


The DNSQuerySniffer utility from NirSoft will display the results of DNS queries as they happen, and includes the IP address of the DNS server.



You could visit http://whatsmyresolver.stdlib.net/ The page tells you what dns server you used to resolve a domain. This has the advantage that it works even when you don't have access to your router, or your dns queries are man in the middled by your isp or something similar.


I believe you will always be using your primary dns server unless that fails. That's the reason we have alternate DNS aka secondary DNS server.

  • 2
    If it has failed-over, how can I see that? Commented Feb 17, 2014 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .