How to Find Your Primary and Secondary DNS
In this article
To find your primary and secondary DNS servers, check your device's network settings: on Windows, open Settings > Network & Internet > Wi-Fi (or Ethernet) > Hardware properties; on macOS, go to System Settings > Network and click your connection; on Android, look under Wi-Fi > network details; on iPhone, go to Settings > Wi-Fi > info (i). The DNS addresses are listed there. If you need the DNS servers your router uses, log into your router's admin page and look under WAN or Internet settings. This guide walks you through each platform step by step.
What You'll Need
- Access to the device whose DNS you want to find (Windows PC, Mac, Android, iPhone, or router).
- For router login: the router's IP address (often 192.168.1.1 or 192.168.0.1) and admin username/password (usually printed on the router label).
- For command-line methods: permission to open Command Prompt or Terminal.
Step-by-Step
- Find DNS on Windows 10/11
- Press Windows key + I to open Settings.
- Click Network & Internet.
- Choose Wi-Fi or Ethernet depending on your connection.
- Click the connected network name (e.g., “HomeWiFi”).
- Scroll down to Properties and look for DNS servers. You'll see the primary and secondary addresses listed (e.g., 8.8.8.8 and 8.8.4.4).
- Find DNS on macOS
- Open System Settings (or System Preferences on older macOS).
- Click Network.
- Select your active connection (Wi-Fi or Ethernet) on the left.
- Click Details (next to the connection).
- Go to the DNS tab. The DNS servers are listed under “DNS Servers” – the first is primary, the second is secondary.
- Find DNS on Android (stock Android 12+ example)
- Open Settings.
- Tap Wi-Fi.
- Tap the connected network (or the gear icon next to it).
- Look for IP settings or DNS – on some phones, you may need to tap “Modify network” and then “Advanced options” to see DNS. If the phone uses DHCP, the DNS servers are often shown as “DNS 1” and “DNS 2”.
- Find DNS on iPhone/iPad
- Open Settings.
- Tap Wi-Fi.
- Tap the blue i icon next to the connected network.
- Scroll down to DNS – you'll see the DNS servers listed (e.g., “8.8.8.8, 8.8.4.4”).
- Find DNS via Command Prompt (Windows)
- Press Windows key + R, type
cmd, and press Enter. - Type
ipconfig /alland press Enter. - Look for your active network adapter (e.g., “Ethernet adapter” or “Wireless LAN adapter”).
- Find the line “DNS Servers” – it will list the primary and secondary DNS addresses.
- Press Windows key + R, type
- Find DNS via Terminal (macOS/Linux)
- Open Terminal (on macOS, it's in Utilities).
- Type
scutil --dns | grep 'nameserver\[0\]'and press Enter. This shows the DNS servers in use. - Alternatively, type
cat /etc/resolv.confand look for “nameserver” lines.
- Find DNS on your router
- Find your router's IP address: on Windows, run
ipconfigand look for “Default Gateway”; on Mac, go to System Settings > Network > Details > TCP/IP and note the Router address. - Open a web browser and enter that IP address (e.g., 192.168.1.1).
- Log in with the router's admin username/password (often “admin”/“admin” or printed on the router sticker).
- Look for a section called WAN, Internet, or DNS. The DNS servers set there are your primary and secondary DNS.
- Find your router's IP address: on Windows, run
Common Mistakes
- Confusing “DNS servers” with “IP address” – DNS is separate from the device's IP.
- Looking at the wrong network adapter in
ipconfig– make sure you're checking the one that's actually connected (e.g., Wi-Fi vs. Ethernet). - On Android, some phones hide DNS behind “Advanced” – you may need to tap “Modify network” to see it.
- Forgetting that a VPN or custom DNS app can override the system DNS – the DNS shown in Settings might not be the one actually used.
- Assuming the router's DNS is the same as your ISP's – sometimes the router uses its own DNS (like 192.168.1.1) as a proxy.
Tips
- If you only see one DNS server, that's your primary; the secondary may be blank or set automatically.
- To see the actual DNS servers your computer is using (including those from a VPN), use the command-line methods – they show the active resolvers.
- On Windows, you can also use
nslookupto query a specific DNS server, but that doesn't show your current DNS. - If you're trying to change DNS, note that the steps are similar – you edit the same settings where you found the current DNS.
- Routers often have a “DNS” section under WAN settings; if you change it there, all devices on the network use the new DNS.
Troubleshooting
If you can't find the DNS in the GUI, or the address seems wrong, try these:
- Restart your device – sometimes the network stack needs a refresh.
- Check if a VPN is active – VPNs often override DNS. Disconnect the VPN and re-check.
- Use the command line – on Windows,
ipconfig /allalways shows the DNS servers assigned by DHCP. On macOS,scutil --dnsshows the current resolver. - If you can't log into the router – try the default credentials from the router's label or manual; if you've changed them and forgot, you may need to reset the router (this will erase all settings).
- If the DNS shows as 0.0.0.0 or blank – this usually means the device is set to obtain DNS automatically, and the actual DNS is assigned by the router or ISP. Check the router's WAN status.
- If you're on a corporate or school network – the IT department may have set DNS policies that hide it; contact them.
Frequently Asked Questions
What is the difference between primary and secondary DNS?
The primary DNS is the first server your device asks to resolve a domain name. If it doesn't respond, the secondary DNS is used as a backup. Both are usually set by your ISP or a public DNS provider like Google (8.8.8.8 and 8.8.4.4).
Can I use the same DNS for both primary and secondary?
Yes, but it's not recommended because if that server fails, you have no backup. Use two different servers (e.g., 8.8.8.8 and 1.1.1.1) for redundancy.
Why does my router show a different DNS than my computer?
Your router may be set to use a specific DNS (like your ISP's), while your computer is set to “Obtain DNS automatically,” which means it uses the router's DNS. If you've manually set DNS on your computer, it overrides the router's.
How do I find my DNS on an Xbox or PlayStation?
On Xbox: go to Settings > General > Network settings > Advanced settings > DNS settings. On PlayStation: go to Settings > Network > View Connection Status – the DNS is shown there. These consoles don't offer a direct “find DNS” option, but the connection status shows it.
Is it safe to share my DNS server addresses?
Yes, DNS server addresses are not sensitive. They are public information, and your ISP's DNS IP is not a security risk. However, your device's IP address and other network details should be kept private.
What if I see multiple DNS servers listed?
That's normal. The first one is the primary, the second is secondary, and additional ones are tertiary, etc. Your device will try them in order until one responds.