What DNS settings are and why to check them
DNS settings tell your device which server to ask when you type a web address into your browser. Instead of remembering that google.com lives at a specific number (an IP address), your device asks a DNS server to translate the name into that number. When you check your DNS settings, you are looking at which servers your device is currently using for that translation.
You check DNS settings to confirm your device is using the servers you intended — either your router's default ones, your internet provider's servers, or a public DNS service like Cloudflare or Google DNS. If your DNS settings point somewhere unexpected, it can mean malware has redirected your traffic, a network misconfiguration is sending you to the wrong place, or a previous configuration change did not stick.
The steps differ slightly between Windows, Mac, and Linux, but the goal is the same: find the DNS server addresses your device is actually using right now.
Key Takeaways
- On Windows, open Command Prompt and type ipconfig /all to see your DNS servers listed under your network adapter.
- On Mac, go to System Settings, select your network connection, and click Details to view DNS servers in the DNS tab.
- On Linux, check /etc/resolv.conf in a terminal or use systemd-resolve --status if your system uses systemd.
- Your device may show multiple DNS servers listed in order — it tries the first one, then the second if the first does not respond.
- If your DNS settings do not match what you configured, restart your device or manually set them again in your network settings.
Checking DNS settings on Windows
Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. Type the command ipconfig /all and press Enter. The output will list every network adapter on your computer.
Find the adapter you are actually using — usually called "Ethernet" if you are plugged in with a cable, or "Wireless LAN adapter" or "Wi-Fi" if you are on wireless. Look for the line that says "DNS Servers" under that adapter. You will see one or more IP addresses listed. Those are your current DNS servers.
If you see multiple DNS servers, your device will try them in order. If the first one does not respond, it moves to the second. Write down the addresses you see so you can compare them to what you intended to set.
Checking DNS settings on Mac
Click the Apple menu in the top-left corner and select System Settings. Click Network in the left sidebar. Select the connection you are using — Wi-Fi if you are wireless, or Ethernet if you are plugged in with a cable.
Click the Details button. A new window opens. Click the DNS tab at the top. You will see a list of DNS servers under "DNS Servers". If the list is empty, your device is using the DNS servers provided by your router or internet provider automatically.
If you see addresses listed, those are the DNS servers you have manually set. Write them down to confirm they match your intention.
Checking DNS settings on Linux
Open a terminal. The simplest way to check DNS settings depends on whether your system uses systemd, which most modern Linux distributions do. Type systemd-resolve --status and press Enter. Look for the section labeled "DNS Servers" — the addresses listed there are your current DNS servers.
If that command does not work or returns an error, your system may use an older DNS configuration method. Type cat /etc/resolv.conf and press Enter. Look for lines that start with "nameserver" — each one is a DNS server your device is using.
Some systems use both methods at once, so you may see DNS servers listed in both places. The systemd output is usually more reliable on modern systems.
Understanding multiple DNS servers and fallback order
Most devices list more than one DNS server. The first one in the list is your primary — your device asks it first. If that server does not respond within a timeout period (usually a few seconds), your device moves to the second server in the list, then the third if needed.
This fallback system keeps you online if one DNS server goes down. However, it also means that if your primary DNS server is slow or unreliable, you may experience delays even though a faster backup server is available. If you see a DNS server listed that you did not set, it may be a backup added by your router or internet provider.
What to do if your DNS settings are wrong
If the DNS servers you see do not match what you intended to set, the simplest first step is to restart your device. Sometimes a configuration change does not take effect until after a restart, or a temporary glitch caused your device to fall back to a default server.
If restarting does not fix it, you will need to set your DNS servers manually in your network settings. On Windows, right-click the network icon in the system tray, select Open Network and Internet Settings, then click Change Adapter Options. Right-click your connection and select Properties. Highlight Internet Protocol Version 4 (TCP/IPv4) and click Properties. Click "Use the following DNS server addresses" and enter the servers you want. On Mac, go back to System Settings, Network, Details, and the DNS tab — click the plus button to add servers or the minus button to remove them. On Linux, edit /etc/resolv.conf directly or use your distribution's network configuration tool.
Common DNS servers to use if you need to change yours
If you decide to switch DNS servers, several public options are widely used. Cloudflare DNS uses 1.1.1.1 and 1.0.0.1. Google DNS uses 8.8.8.8 and 8.8.4.4. Quad9 uses 9.9.9.9 and 149.112.112.112. OpenDNS uses 208.67.222.222 and 208.67.220.220. Each of these services is free and does not require registration.
Your internet provider also runs DNS servers, usually listed in your router's documentation or on their website. Using your provider's DNS servers can sometimes be faster because they are closer to you geographically, though public DNS services often have better security features.
Frequently Asked Questions
Why would I want to change my DNS servers?
You might change DNS servers to use a service with better security features, to avoid DNS filtering by your internet provider, or because your current DNS server is slow or unreliable. Some people also change DNS servers as part of setting up a home network with specific security rules.
Can a virus change my DNS settings without my permission?
Yes, some malware redirects DNS settings to servers controlled by attackers, which can intercept your traffic or redirect you to fake websites. If you find DNS servers you did not set, and you cannot change them back, run a full antivirus scan and consider resetting your network settings or reinstalling your operating system.
What if I see 127.0.0.1 as a DNS server?
That address means your device is using itself as a DNS server, which usually happens when you are running local DNS software like Pi-hole or dnsmasq. This is intentional if you set it up; if you did not, it may indicate misconfiguration or unwanted software.
Do I need to set DNS on every device on my network?
No. You can set DNS once on your router, and every device that connects to that router will use those servers automatically. Setting DNS on individual devices overrides the router's settings for just that device, which is useful if you want one computer to use different servers than the rest of your network.
Will changing DNS servers affect my internet speed?
It might, but usually not noticeably. DNS lookups happen once per domain name, not for every page load, so the speed difference is usually a few milliseconds. If you switch to a much slower DNS server, you may notice delays when visiting a new website for the first time, but not on repeat visits.