On Windows, open Command Prompt, run ipconfig /all, and find DNS Servers under the adapter you are using. On a Mac, open System Settings → Network → your network service → Details → DNS and read the DNS Servers list.
You are checking the addresses configured for that connection. You do not need to change them to discover them, and viewing the list does not improve speed or security by itself.
Find Your DNS Servers on Windows
- Connect to the Wi-Fi or Ethernet network you want to inspect.
- Open Start, type Command Prompt, and open it.
- Type
ipconfig /alland press Enter. - Find the adapter section for your current connection. Look for Wireless LAN adapter Wi-Fi or the appropriate Ethernet adapter; names vary.
- Read DNS Servers in that section. An additional address may be printed on the next line beneath the first.

Microsoft’s ipconfig reference documents the command and its /all option. The output contains several kinds of addresses, so copy the values beside DNS Servers rather than those beside IPv4 Address, DHCP Server, or Default Gateway. For what the IPv4 Address line means, see our guide to finding your IP address on Windows 11.
For example, if an adapter’s DNS Servers field lists two addresses across two lines, keep both and note the adapter name. If another section says Media disconnected, do not assume its settings describe your connected network.
Use PowerShell for a Shorter DNS List
Open Windows PowerShell from Start and run:
Get-DnsClientServerAddress
The output groups server addresses by interface and address family. Find the InterfaceAlias matching your connection, then read its ServerAddresses. IPv4 and IPv6 entries can appear separately.
To inspect one interface, substitute its actual alias in this command:
Get-DnsClientServerAddress -InterfaceAlias "Wi-Fi"
Microsoft’s Get-DnsClientServerAddress reference explains the interface filter. Use the name from your output; a computer’s wireless interface is not necessarily named Wi-Fi.
Find Your DNS Servers on a Mac
- Open the Apple menu → System Settings.
- Select Network in the sidebar.
- Select the network service you are using, such as Wi-Fi or Ethernet.
- Select Details, then DNS. You may need to scroll.
- Read the DNS Servers list. Leave its entries unchanged if your goal is only to inspect them.
Apple’s DNS settings guide distinguishes DNS Servers from Search Domains. Server entries are IP addresses; search domains are a separate setting.
What “Primary” and “Secondary” Mean Here
When someone asks for your primary and secondary DNS, record the configured server list and the connection it belongs to. A list may contain one address, two addresses, or more. There is no requirement that your screen show exactly two.
Do not invent a second address when only one appears. Likewise, an IPv6 address containing colons is not automatically a secondary IPv4 server. Keep the two address families distinct when reporting the result.
Configuration is also different from a complete record of which server answered each query. These steps show configured addresses; they do not test every application’s DNS behavior or prove that every listed server works.
If the Result Is Missing or Confusing
- Too many adapters: Match the connected interface before copying values. A VPN or virtual adapter can have its own entry.
- No useful entry: Confirm that the intended connection is active, then rerun the command. In PowerShell, check both address-family rows instead of stopping at an empty one.
- Different results on another network: Compare the same adapter on the same connection. Keep a note of the network and whether a VPN was connected when you checked.
- You need to edit Windows settings: Our Windows 11 adapter settings guide explains where the controls are and how to undo a change. First record the current values.
Frequently Asked Questions
Is ipconfig /displaydns the same thing?
No. It displays the client’s DNS resolver cache. Use ipconfig /all for adapter configuration; a list of cached website records is not your primary and secondary server list.
Do I need to change DNS to complete this guide?
No. Stop once you have recorded the addresses for the intended connection. Do not replace working settings with guesses.
Does a second DNS server guarantee uninterrupted internet access?
No. Listing another resolver does not establish that it is reachable or rule out other connection problems. This guide checks settings rather than guaranteeing connectivity.

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are tested on current devices or checked against official product documentation, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.