Change DNS Settings on Windows, Mac, Mobile, and Routers

A network administrator adjusts a laptop beside a wireless router.

PacketTools runs browser-based DNS diagnostics without logging a single query, and the same habits that keep those tools honest apply to your own machines: know which resolver answers your lookups, change it on purpose, and confirm the result. To switch, open your device’s network settings, set DNS from automatic to manual, and enter a primary and secondary resolver address.

A network administrator adjusts a laptop beside a wireless router.

To change DNS settings, open the network adapter or Wi-Fi properties on your device (or the WAN/Internet page on your router), switch DNS assignment to Manual, and enter a trusted resolver pair such as Cloudflare’s 1.1.1.1 and 1.0.0.1 or Google Public DNS’s 8.8.8.8 and 8.8.4.4. A device-level change affects one machine and is easy to undo. A router change pushes the new resolver to every device that gets its address from the router.

Every step below includes the path back to your original configuration. A DNS change that breaks name resolution looks exactly like an internet outage, so the rollback is as important as the switch.

When Does a Different DNS Resolver Help?

A person reviews network settings on a laptop beside a wireless router.

A different resolver helps when your current DNS server is slow, unreliable, filtering things you don’t want filtered, or keeping logs you’d prefer it didn’t. The domain name system translates a domain name into an IP address, and by default your device asks whichever DNS server your internet service provider (ISP) hands out through DHCP.

Swapping that server changes who answers your lookups and what policies they apply. It leaves your connection speed, routing, and public address untouched.

What Can a DNS Change Fix, and What Can’t It?

A resolver change fixes problems that live in the lookup step. Good candidates include:

  • ISP resolver outages or timeouts, where pages hang on “Resolving host” while ping to a numeric address works fine
  • Stale or incorrect answers from a poorly maintained ISP cache
  • Unwanted ISP redirection, such as typo domains landing on an ad-filled search page
  • Missing security filtering, when you want a resolver that blocks known malware and phishing domains
  • Privacy preferences, when you’d rather send queries to a provider with a published no-logging policy

A DNS change does not increase internet bandwidth, encrypt all internet traffic, or change your public IP address. Packet loss, a weak Wi-Fi signal, a saturated uplink, and a down fiber line all stay exactly as they were. If you’re fuzzy on how addressing and name resolution fit together, the basics of IP addresses clear that up quickly.

A quick test separates the two: if ping 1.1.1.1 succeeds but ping packettools.com fails, you have a DNS problem. If both fail, start broader network troubleshooting before touching resolver settings.

Which Public DNS Servers Should You Consider?

Public DNS servers from large providers run anycast networks with redundant nodes, which is why they’re common choices for a switch. These are the published addresses for the most widely used options:

Provider IPv4 primary IPv4 secondary IPv6 primary Notable for
Cloudflare 1.1.1.1 1.0.0.1 2606:4700:4700::1111 Speed, privacy policy
Google Public DNS 8.8.8.8 8.8.4.4 2001:4860:4860::8888 Reliability, global reach
Quad9 9.9.9.9 149.112.112.112 (provider-published) Malware and phishing blocking
OpenDNS (Cisco) 208.67.222.222 208.67.220.220 2620:119:35::35 Content filtering
OpenDNS FamilyShield 208.67.222.123 208.67.220.123 (provider-published) Adult content blocking

Pick one provider and use its own primary and secondary pair. Mixing a filtering resolver with a non-filtering one produces inconsistent results, because your device may fall back to the secondary and skip the filter entirely.

Read the provider’s current privacy and logging policy before you commit. Public resolvers differ in what they keep, and speed claims say nothing about data handling.

How Do You Set DNS on Windows 11 and Windows 10?

Windows gives you four routes: the Settings app, the classic Control Panel, PowerShell, and netsh in Command Prompt. All of them write the same per-adapter setting, so choose the one that fits whether you’re fixing one laptop or scripting a fleet. Changing DNS requires an administrator account.

Before you start, run ipconfig /all and note the current DNS Servers line for your active adapter. That’s your rollback record.

Use the Windows 11 Settings App for Wi-Fi or Ethernet

To change DNS on Windows 11 through the Settings app:

  1. Right-click Start and choose Settings.
  2. Select Network & internet.
  3. For Wi-Fi, choose Wi-Fi, then Hardware properties (or your network’s properties). For a wired link, choose Ethernet.
  4. Next to DNS server assignment, click Edit.
  5. Change the dropdown from Automatic (DHCP) to Manual.
  6. Turn on IPv4.
  7. Enter the Preferred DNS address (for example, 1.1.1.1) and the Alternate DNS address (1.0.0.1).
  8. Click Save.

The setting applies per network. If you set it on your home Wi-Fi, a coffee shop network or your Ethernet adapter still uses whatever DHCP hands out. Switching back means returning the dropdown to Automatic (DHCP). If you’ve ever set a static address on that adapter, the difference between DHCP and static IP assignment explains why the DNS fields sometimes stay locked to manual.

Use Control Panel on Windows 10 or Windows 11

The Control Panel route works on both versions and exposes the classic TCP/IPv4 dialog many admins prefer:

  1. Open Control Panel and go to Network and Sharing Center.
  2. Click Change adapter settings.
  3. Right-click your active network adapter and choose Properties.
  4. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  5. Choose Use the following DNS server addresses.
  6. Fill in Preferred DNS server and Alternate DNS server.
  7. Click OK, then Close.

A tip from production work: tick Validate settings upon exit if you see it. It won’t catch a typo in a resolver address, but it flags a broken adapter configuration before you close the window and lose your connection.

Use PowerShell or Command Prompt for Repeatable Changes

PowerShell is the fastest way to make the same change across machines. Open Terminal (Admin) and find your interface index:

Get-NetIPConfiguration

Then set the servers with Set-DnsClientServerAddress, replacing 6 with your index:

Set-DnsClientServerAddress -InterfaceIndex 6 -ServerAddresses 1.1.1.1,1.0.0.1

To roll back to DHCP-assigned DNS:

Set-DnsClientServerAddress -InterfaceIndex 6 -ResetServerAddresses

In Command Prompt (run as administrator), netsh does the same job using the adapter name:

netsh interface ipv4 set dnsservers name="Wi-Fi" static 1.1.1.1 primary
netsh interface ipv4 add dnsservers name="Wi-Fi" 1.0.0.1 index=2

Revert with netsh interface ipv4 set dnsservers name="Wi-Fi" source=dhcp. Adapter names must match exactly, so run netsh interface show interface first if you’re unsure.

Configure IPv6 and DNS over HTTPS Where Supported

If your ISP gives you IPv6 connectivity, set IPv6 resolvers too. Otherwise your device keeps asking the ISP’s IPv6 DNS server for some lookups, and your change only half applies. In the Windows 11 Edit DNS settings window, toggle IPv6 on and enter the provider’s IPv6 pair, such as 2606:4700:4700::1111 and 2606:4700:4700::1001 for Cloudflare. In Control Panel, the same fields sit under Internet Protocol Version 6 (TCP/IPv6).

Windows 11 also supports DNS over HTTPS, which encrypts lookups between your PC and the resolver. After entering a recognized resolver address in Settings, the DNS over HTTPS dropdown appears under each server. Choose On (automatic template) to encrypt queries to providers Windows knows, including Cloudflare, Google, and Quad9. Run netsh dns show encryption to list the resolvers Windows has templates for.

How Do You Set DNS on Other Devices and Your Router?

A person configures a laptop beside a Wi-Fi router, smartphone, and tablet.

Every platform stores a DNS server address per network connection, and each has both a graphical path and, on desktops, a command-line equivalent. Mobile devices add encrypted “Private DNS” options that take a hostname, while routers push your choice to every client.

Update DNS on macOS

On macOS Ventura and later:

  1. Open Apple menu > System Settings > Network.
  2. Select Wi-Fi or Ethernet, then click Details next to your connected network.
  3. Choose DNS in the sidebar.
  4. Under DNS Servers, click + and enter your primary address, then click + again for the secondary.
  5. Click OK.

Gray entries are values your router supplied; your manual entries replace them. From Terminal, the same change is one line:

networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1

To return to DHCP-assigned DNS, run networksetup -setdnsservers Wi-Fi Empty. Use networksetup -listallnetworkservices if your service name differs from “Wi-Fi.”

Update DNS on Linux

On desktop distributions using NetworkManager (Ubuntu, Fedora, and most others), open Settings > Wi-Fi or Network, click the gear next to your connection, open the IPv4 tab, turn off Automatic DNS, enter comma-separated addresses, and click Apply. Toggle the connection off and on to load the change.

From the terminal, nmcli is cleaner and scriptable:

nmcli connection show --active
nmcli connection modify "Home-WiFi" ipv4.dns "1.1.1.1 1.0.0.1" ipv4.ignore-auto-dns yes
nmcli connection up "Home-WiFi"

Revert with ipv4.dns "" ipv4.ignore-auto-dns no. Avoid editing /etc/resolv.conf directly on systemd-resolved systems; it points to a local stub at 127.0.0.53 and gets rewritten.

Update DNS on iPhone, iPad, and Android

On iPhone and iPad, DNS is set per Wi-Fi network:

  1. Open Settings > Wi-Fi and tap the (i) next to your network.
  2. Scroll to Configure DNS and choose Manual.
  3. Delete the existing entries, tap Add Server, and enter your addresses.
  4. Tap Save.

Cellular connections on iOS don’t expose this setting; you’d need a provider’s configuration profile or app for encrypted DNS on mobile data.

On Android 9 and later, the cleanest option is Private DNS, which applies to Wi-Fi and mobile data and encrypts lookups with DNS over TLS:

  1. Open Settings > Network & internet (Samsung: Connections > More connection settings).
  2. Tap Private DNS and choose Private DNS provider hostname.
  3. Enter a hostname such as one.one.one.one (Cloudflare) or dns.google (Google).
  4. Tap Save.

Private DNS takes a hostname, so typing 1.1.1.1 into that field fails.

Update Your Router for Devices Across the Network

A router change covers smart TVs, consoles, and guest devices you can’t configure individually. Find your router’s IP address from the Default Gateway line in ipconfig (common values are 192.168.1.1 and 192.168.0.1), sign in with the admin credentials, and look for the DNS fields on the WAN or Internet page. Common locations:

Router brand Typical path
TP-Link Advanced > Network > Internet (classic UI: Network > WAN)
Netgear Advanced > Setup > Internet Setup
Asus WAN > Internet Connection > WAN DNS Setting
Linksys Connectivity > Internet Settings
D-Link Setup > Internet > Manual Internet Connection Setup

Switch from automatic to manual DNS, enter the primary and secondary addresses, and save. Screenshot the original values first.

Clients keep their old resolver until their lease renews, a detail that makes more sense once you know what DHCP does on your network. Reboot the router or reconnect each device to force it. ISP-rented gateways from some providers lock these fields; in that case, set DNS on each device or put the gateway in bridge mode behind your own router.

How Can You Verify the New Resolver Is Working?

Verification takes three checks: confirm the address your device is configured to use, confirm lookups succeed through that resolver, and confirm nothing else on the system is quietly sending queries elsewhere. Saving a setting proves nothing until you’ve seen the new DNS server answer.

Check the DNS Addresses Assigned to Your Device

Each platform reports its active resolvers with one command:

  • Windows: ipconfig /all (look for DNS Servers under your active adapter) or Get-DnsClientServerAddress in PowerShell
  • macOS: scutil --dns | grep nameserver
  • Linux: resolvectl status or nmcli device show | grep DNS
  • iPhone/Android: reopen the Wi-Fi details or Private DNS screen; Android shows “Connected” under Private DNS when the hostname validates

If you changed the router, your device will still list the router’s own address (such as 192.168.1.1) as its DNS server. That’s normal; the router forwards queries upstream, so check the router’s status page or run the external tests below.

Test Name Resolution and Compare DNS Results with PacketTools

Run nslookup packettools.com and read the Server and Address lines at the top. They should show your new resolver. On Windows, nslookup contacts only the primary DNS server configured, so use Resolve-DnsName packettools.com to test what the full Windows client does, including fallback to the alternate.

Query a resolver directly to compare answers: nslookup packettools.com 1.1.1.1 versus nslookup packettools.com 8.8.8.8. Different IPs aren’t automatically a fault; answers differ during the 24-48 hour propagation window after a record change, and CDN-hosted domains return location-based results.

For an outside view, the PacketTools DNS Propagation Checker queries public resolvers worldwide, and DNS Lookup checks individual record types. Neither logs your queries. A DNS leak test shows which resolver operator the internet sees your lookups coming from, which catches router or ISP interception your local commands miss.

Account for Browser Secure DNS, VPNs, and Cached Answers

Your OS setting can be correct while traffic still goes elsewhere. Three common overrides:

  • Browser secure DNS: Chrome, Edge, and Firefox can send lookups over DNS over HTTPS to their own configured provider. Check Settings > Privacy and security > Use secure DNS in Chrome or Edge, and Privacy & Security > DNS over HTTPS in Firefox.
  • VPN clients: most VPNs push their own resolvers while connected, replacing yours until you disconnect.
  • Cached answers: your OS, browser, and router each cache results until the record’s TTL expires, so an old answer can survive a resolver change.

Test with the VPN off and in a fresh browser window before deciding the change failed.

What If Sites Stop Resolving?

A typo in the DNS server address is the most common reason sites stop loading right after a change, followed by setting DNS on the wrong adapter and network policies that block outside resolvers. Work through those before assuming the provider is down.

Check the Address, Adapter, and Network Policy

Start with the configuration you just entered:

  1. Re-read the address. 1.1.1.1 typed as 1.1.11 or 8.8.8.8 entered as 8.8.4 makes every lookup time out. Browser errors like DNS_PROBE_FINISHED_BAD_CONFIG point straight at this.
  2. Confirm the adapter. Machines with Wi-Fi, Ethernet, and virtual adapters (Hyper-V, VMware, VPN) often get the change on an inactive interface. Match the adapter in ipconfig /all to the one carrying your default gateway.
  3. Ping the resolver. ping 1.1.1.1 should reply. If it doesn’t, something between you and the resolver is blocking it.
  4. Check network policy. Corporate networks, schools, and some guest Wi-Fi block outbound UDP and TCP port 53 to anything except their own resolvers. Firewalls and endpoint security products do the same locally.

On a managed work device, Group Policy or MDM can overwrite your DNS settings at the next refresh. Follow your organization’s policy there. Persistent “DNS server not responding” errors on a clean configuration usually mean the resolver is unreachable from your network.

Clear Cached Results and Restore the Previous DNS Configuration

Clear stale answers before retesting. Windows checks the cache, then the Hosts file, then the DNS server when resolving names… that order means a cached or hosts-file entry wins every time.

To flush the DNS cache:

  • Windows: ipconfig /flushdns
  • macOS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • Linux (systemd-resolved): resolvectl flush-caches
  • Chrome/Edge: visit chrome://net-internals/#dns and click Clear host cache

If lookups still fail, roll back using the values you recorded. Set Windows back to Automatic (DHCP) or run Set-DnsClientServerAddress -ResetServerAddresses, use networksetup -setdnsservers Wi-Fi Empty on macOS, and set iOS Configure DNS back to Automatic. Restore the router’s original WAN DNS values from your screenshot. Once resolution works again, retry the new resolver on a single device to isolate the fault.

Choose a Resolver, Test It, and Keep a Way Back

A clean DNS change follows the same order on every platform: write down the current values, set a matched primary and secondary from one provider, and confirm with nslookup or Resolve-DnsName that the new server answers.

Test on one device first. Move the change to your router only after that device resolves sites reliably for a day, since a router mistake takes down every client on the network.

Keep your rollback commands handy:

  • Windows: set Automatic (DHCP) or run Set-DnsClientServerAddress -InterfaceIndex <n> -ResetServerAddresses
  • macOS: networksetup -setdnsservers Wi-Fi Empty
  • Linux: clear ipv4.dns and set ipv4.ignore-auto-dns no
  • Router: re-enter the original WAN DNS values from your screenshot

When results look odd, check browser secure DNS and any active VPN before blaming the resolver. Then compare answers across public resolvers with the PacketTools DNS Propagation Checker and DNS Lookup, and flush local caches once the outside view looks correct.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *