To check my DNS settings, list the DNS servers your device is configured to use: run ipconfig /all on Windows, scutil --dns on macOS, or resolvectl status on Linux. The address next to "DNS Servers" (or "nameserver") is the resolver that receives your device's lookups.
That answers "which DNS server am I using" for the operating system. It does not always tell you who ultimately resolves your queries, because a home router often sits in the middle. The sections below show each command, how to read the output, and how to confirm what actually answered.
Check which DNS server you are using on Windows
The quickest way is the full network configuration listing:
ipconfig /all
Per Microsoft's documentation, /all displays the full TCP/IP configuration for all adapters, and those adapters can be physical (Wi-Fi, Ethernet) or logical (a VPN or virtual switch). Find the adapter that is connected and read its DNS Servers line. Example output, with documentation-range addresses:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : home.example
IPv4 Address. . . . . . . . . . . : 192.168.1.42
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
8.8.4.4
Several servers are listed in order. Windows asks the first one and normally falls back to the next only when the first does not answer.
PowerShell gives the same information as objects, which is easier to filter:
Get-DnsClientServerAddress
The cmdlet "gets DNS server IP addresses from the TCP/IP properties on an interface". It accepts -InterfaceAlias to limit the output to one adapter and -AddressFamily (IPv4 or IPv6) to limit it to one protocol:
Get-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -AddressFamily IPv4
Example output:
InterfaceAlias Interface Address ServerAddresses
Index Family
-------------- --------- ------- ---------------
Wi-Fi 12 IPv4 {192.168.1.1, 8.8.4.4}
Adapter names vary by machine. Run Get-DnsClientServerAddress with no arguments first to see yours. Virtual adapters (Hyper-V, WSL, VPN clients) show up here too and often have empty lists, which is normal.
Check your DNS server on macOS
Open Terminal and run:
scutil --dns
The manual page says this option "reports the current DNS configuration". The output is a numbered list of resolvers. Per the manual, the first resolver listed is the main default, and later "supplemental" entries apply only to queries for their own domain (a VPN or a corporate domain, for example). Example output, shortened:
DNS configuration
resolver #1
search domain[0] : home.example
nameserver[0] : 192.168.1.1
nameserver[1] : 8.8.4.4
if_index : 12 (en0)
flags : Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
Read nameserver[0] under resolver #1 first. The if_index line tells you which network interface that resolver belongs to; en0 is commonly Wi-Fi on a laptop, but check your own output. In System Settings, the same servers appear under Network, your connection, Details, then the DNS tab. That tab shows the servers set for that connection, while scutil --dns shows the merged result the system is really using.
Check your DNS server on Linux
Most current desktop distributions run systemd-resolved. Ask it directly:
resolvectl status
This "shows the global and per-link DNS settings currently in effect." Look under the link for your connection (often a name such as wlp3s0 or enp4s0) for its DNS servers. Example output, shortened:
Link 2 (wlp3s0)
Current Scopes: DNS
Protocols: +DefaultRoute
Current DNS Server: 192.168.1.1
DNS Servers: 192.168.1.1 8.8.4.4
To print only the per-interface servers, use resolvectl dns.
Do not be alarmed if cat /etc/resolv.conf shows nameserver 127.0.0.53. The systemd documentation says the service provides "a local DNS stub listener on the IP addresses 127.0.0.53 and 127.0.0.54 on the local loopback interface", and that the stub file "lists the 127.0.0.53 DNS stub as the only DNS server". Applications talk to that local stub, and systemd-resolved forwards to the real servers shown by resolvectl status. If your system does not use systemd-resolved, /etc/resolv.conf is the file to read, and its nameserver lines are the servers in use.
Read the result: router, ISP or public DNS
The address tells you who is configured, though not always who is ultimately answering:
| What you see | What it usually means |
|---|---|
192.168.x.x, 10.x.x.x, or 172.16.x.x to 172.31.x.x | A private address, usually your router. The router answers or forwards your queries to its own upstream resolver. |
1.1.1.1, 8.8.8.8, 9.9.9.9 | A public resolver you or your router set manually (Cloudflare, Google, Quad9). |
| A public address you do not recognise | Often your internet provider's resolver, handed out over DHCP. Look the address up before assuming anything else. |
127.0.0.53 or 127.0.0.1 | A resolver running on your own machine, such as the systemd-resolved stub or a local DNS filter. |
| Empty list on a connected adapter | No DNS servers are configured for it, so name lookups on that adapter fail. |
The "private address means router" rule is a convention, not a guarantee. The router, in turn, is typically set to use whatever its provider assigns, unless someone changed it. Open the router's admin page to see its internet-side DNS servers. To understand why the DNS server arrives on your device automatically in the first place, see how DHCP and DNS work together.
Confirm which server actually answers a query
Configuration and behaviour can differ, for example when a VPN overrides your servers. nslookup shows the server that answered. Run it with a name:
nslookup example.com
Example output:
Server: router.home.example
Address: 192.168.1.1
Non-authoritative answer:
Name: example.com
Addresses: 2606:2800:21f:cb07:6820:80da:af6b:8b2c
93.184.216.34
The first two lines identify the server that handled the query. Microsoft's reference states that when you omit the second argument, nslookup uses the default DNS name server, so the header shows the server your system picked. To compare it against a specific resolver, name one as the second parameter:
nslookup example.com 1.1.1.1
If the two answers or response times differ, you have found a resolver-level difference. For a longer walkthrough of lookup tools, see DNS lookup with nslookup and dig, and to compare resolver speeds, see how to test DNS server speed and latency.
Check for a DNS leak when you use a VPN
If you connect to a VPN, the servers you should see are the VPN's, not your provider's. When the list still shows your home router or provider, queries may bypass the tunnel. The DNS leak test guide covers how to test and fix that.
If the DNS server looks wrong
- It is not the server you set. Another interface (a VPN or virtual adapter) may rank higher, or the connection is still on automatic (DHCP) settings. Re-read the output for the connected adapter specifically. To change it, follow how to change the DNS server on Windows.
- Old answers keep appearing. The settings may be right while a cached result is stale. Clear it with the steps in flush the DNS cache.
- The listed server is correct but lookups fail. The server may be down or unreachable. Try
nslookup example.com 1.1.1.1: if that works while your configured server does not, the problem is the configured resolver, not your connection.
Frequently asked questions
- Why does my DNS server show 192.168.1.1 or another private address?
- A private address such as 192.168.1.1 is usually your router. Your device sends its DNS queries to the router, and the router either answers from its cache or forwards them to the resolver it was configured with, often one your internet provider assigns. To see the upstream server, open the router's admin page and look at its WAN or internet DNS settings.
- Can I check my DNS in a browser instead of the command line?
- Yes, but a web page can only see the resolver that reaches its own servers, which may not be the one your operating system is configured to use, especially with a VPN or encrypted DNS in the browser. The commands in this article show what the operating system is configured with, so use them first and treat a web test as a second opinion.
- Does the DNS server I see change between Wi-Fi and Ethernet?
- It can. DNS servers are stored per network interface, and each interface may get different servers from its own DHCP lease or manual settings. A VPN adapter often adds its own servers as well. That is why the commands list one entry per adapter or link.
- Is a blank or 127.0.0.53 DNS entry a problem?
- No. On Linux systems that use systemd-resolved, 127.0.0.53 is the local stub resolver, and the real upstream servers are held by the service. Use resolvectl status to see them. An empty list on a connected adapter, on the other hand, means that adapter has no DNS servers configured.