How to Find Your Primary and Secondary DNS Servers

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

  1. Connect to the Wi-Fi or Ethernet network you want to inspect.
  2. Open Start, type Command Prompt, and open it.
  3. Type ipconfig /all and press Enter.
  4. Find the adapter section for your current connection. Look for Wireless LAN adapter Wi-Fi or the appropriate Ethernet adapter; names vary.
  5. Read DNS Servers in that section. An additional address may be printed on the next line beneath the first.
Steps to find your DNS servers on Windows: connect to the network to check, open Command Prompt, type ipconfig /all and press Enter, find your current adapter, read the DNS Servers lines
Illustration: how to find your DNS servers on Windows.

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

  1. Open the Apple menu → System Settings.
  2. Select Network in the sidebar.
  3. Select the network service you are using, such as Wi-Fi or Ethernet.
  4. Select Details, then DNS. You may need to scroll.
  5. 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.

Join Our Free Newsletter

Featured guides and deals

You may opt out at any time.
Read our Privacy Policy