Skip to main content
DNSnexus
Free Developer Tools
DNS
Email
Network
Webmaster
Security
IP
Guides
Live Tools
60+
Categories
6
Result URLs
Shareable
Availability
24/7
DNSnexus
Free Developer Tools
Free DNS, email, network, and security diagnostics with crawlable tool pages and shareable result URLs.
Run DNS CheckBrowse All Tools
Popular Tools
DNS Propagation CheckerDNS LookupWHOIS LookupSPF Record CheckerDMARC CheckerSSL Certificate CheckerPort Scanner
Quick Path
Fix Email Deliverability
Quick Path
Troubleshoot DNS Changes
Quick Path
Validate SSL & Open Ports
DNS Tools
A Record LookupAAAA Record LookupCERT LookupCNAME LookupDNS CheckDNS LookupDNS Propagation CheckerDNSKEY LookupDS LookupIPSECKEY LookupLOC LookupNS LookupNSEC LookupNSEC3PARAM LookupReverse DNS LookupRRSIG LookupSOA LookupSRV LookupTXT LookupWHOIS Lookup
Email Tools
BIMI LookupBlacklist CheckDKIM CheckerDMARC CheckerDMARC Report AnalyzerEmail Deliverability ReportEmail Header AnalyzerEmail Health ReportGoogle/Yahoo Compliance CheckerMicrosoft Compliance CheckerMTA-STS LookupMX Record LookupSMTP TestSPF Record Checker
Network Tools
HTTP LookupHTTPS LookupMAC Address GeneratorMAC Address LookupOnline TraceroutePingSubnet Calculator
Webmaster Tools
HTTP Headers CheckSearch Presence CheckWebsite Link AnalyzerWebsite Operating System CheckWebsite Redirect CheckerWhat is My User Agent?
Security Tools
DKIM Record GeneratorDMARC GeneratorDomain DNS Security CheckEmail Security CheckerPort ScannerSPF GeneratorSSL Certificate CheckerWebsite Vulnerability Scanner
IP Tools
ARIN LookupASN LookupIP Blacklist CheckIP Geolocation LookupWhat Is My IP
Company
All Tools DirectoryGuides & PlaybooksAbout DNSnexusContactAPI DocsPrivacy PolicyTerms & ConditionsCookie Policy
© 2026 DNSnexus — DNS, Email, Network & Security Tool Platform
All ToolsAboutContactPrivacyTerms
Home › Guides › DNS Diagnostics › How to Change DNS Servers (All Devices & Router)
DNS Diagnostics•11 min•Published 2026-07-14

How to Change DNS Servers (All Devices & Router)

Changing your DNS servers means replacing the resolver your device or router uses to turn domain names into IP addresses — usually your ISP's default resolver — with a public one like Cloudflare or Google. The process takes under two minutes per device and can improve resolution speed, add malware/phishing filtering, and stop your ISP from logging every domain you visit.

Quick Answer
To change DNS servers, go to your network adapter or router's DNS settings, replace "Automatic (DHCP)" with "Manual," and enter a resolver's IP addresses — for example, 1.1.1.1 and 1.0.0.1 for Cloudflare. On Windows: Settings → Network & Internet → your connection → Edit DNS. On a router, change it once and it applies to every device on the network.

Why Change Your DNS Servers?

By default, every device on your network uses whatever DNS resolver your ISP assigns via DHCP — set in the "Router Advertisement" or DHCP lease your device gets when it joins the network. That resolver isn't chosen for speed or privacy; it's whatever the ISP runs, and some ISPs log query history or inject ads into NXDOMAIN responses.

Switching to a public resolver like Cloudflare (1.1.1.1), Google Public DNS (8.8.8.8), or Quad9 (9.9.9.9) gives you three practical benefits:

  • Speed. Public resolvers run large, geographically distributed anycast networks with aggressive caching — often faster than a regional ISP resolver, though results vary by location.
  • Privacy. Cloudflare's 1.1.1.1 publishes a third-party-audited no-logs policy; most ISPs do not.
  • Filtering. Resolvers like Quad9 and OpenDNS block known malware and phishing domains at the DNS layer, before your browser even opens a connection.

None of this requires new hardware or software — it's a configuration change in your operating system's network settings, or on your router if you want it applied network-wide.

Which Public DNS Server Should You Use?

The table below lists the major public resolvers, their addresses, and what each one is best known for. All support both DNS over HTTPS (DoH, RFC 8484) and DNS over TLS (DoT, RFC 7858) in addition to plain UDP/TCP port 53.

ProviderPrimary IPv4Secondary IPv4Primary IPv6Known For
Cloudflare1.1.1.11.0.0.12606:4700:4700::1111Speed, privacy, no-logs
Google Public DNS8.8.8.88.8.4.42001:4860:4860::8888Reliability, global anycast
Quad99.9.9.9149.112.112.1122620:fe::feMalware/phishing blocking
OpenDNS (Cisco)208.67.222.222208.67.220.2202620:119:35::35Content filtering, parental controls
CleanBrowsing185.228.168.9185.228.169.92a0d:2a00:1::2Family-safe filtering

Pick Cloudflare or Google for general use, Quad9 or CleanBrowsing if you want built-in filtering, and OpenDNS if you need granular parental-control categories. All five are free and require no account for basic use.

How Do You Change DNS Servers on Windows?

Windows 11 (Settings app):

  1. Open network settings. Press Win + I, then go to Network & internet.
  2. Select your connection. Click Wi-Fi or Ethernet, then click the connected network name.
  3. Edit DNS. Scroll to DNS server assignment and click Edit.
  4. Switch to Manual. Choose Manual from the dropdown, toggle IPv4 on, enter your Preferred DNS and Alternate DNS (e.g., 1.1.1.1 and 1.0.0.1), and click Save.

Windows 10 uses the same flow with slightly different menu paths: Settings → Network & Internet → Change adapter options → right-click your connection → Properties → Internet Protocol Version 4 (TCP/IPv4) → Properties → Use the following DNS server addresses.

For scripted or repeat changes, use the command line instead of the GUI:

Code
# PowerShell (run as Administrator) — replace "Wi-Fi" with your adapter name
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ServerAddresses ("1.1.1.1","1.0.0.1")

# Revert to automatic (DHCP-assigned) DNS
Set-DnsClientServerAddress -InterfaceAlias "Wi-Fi" -ResetServerAddresses
Code
:: Command Prompt (run as Administrator) — netsh equivalent
netsh interface ip set dns name="Wi-Fi" static 1.1.1.1
netsh interface ip add dns name="Wi-Fi" 1.0.0.1 index=2

How Do You Change DNS Servers on macOS?

  1. Open System Settings → Network.
  2. Select your active connection (Wi-Fi or Ethernet) and click Details….
  3. Click the DNS tab.
  4. Click the + button under DNS Servers and add your chosen addresses (e.g., 1.1.1.1, then 1.0.0.1 on a second line).
  5. Click OK, then Apply.

The same change from Terminal, useful for scripting across multiple Macs:

Code
# Set DNS for the Wi-Fi service
sudo networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1

# Revert to DHCP-assigned DNS
sudo networksetup -setdnsservers Wi-Fi "Empty"

# Confirm the current setting
networksetup -getdnsservers Wi-Fi

networksetup -listallnetworkservices prints the exact service name (e.g., "Wi-Fi" or "USB 10/100/1000 LAN") to use in place of Wi-Fi if your Mac uses a different interface name.

How Do You Change DNS Servers on Linux?

Linux DNS configuration depends on which network manager is active — do not edit /etc/resolv.conf directly on a modern distribution, since it's usually a generated symlink that gets overwritten on the next DHCP renewal or reboot.

NetworkManager (most desktop distributions, including Ubuntu Desktop):

Code
# Find your connection name
nmcli connection show

# Set DNS and stop auto-DNS from overwriting it
nmcli connection modify "Wired connection 1" ipv4.dns "1.1.1.1 1.0.0.1"
nmcli connection modify "Wired connection 1" ipv4.ignore-auto-dns yes
nmcli connection up "Wired connection 1"

Netplan (Ubuntu Server, cloud images): edit the YAML file in /etc/netplan/, add a nameservers block, then apply:

Code
network:
  version: 2
  ethernets:
    eth0:
      dhcp4: true
      nameservers:
        addresses: [1.1.1.1, 1.0.0.1]
Code
sudo netplan apply
resolvectl status   # confirm the new resolver is active

How Do You Change DNS Servers on Android and iOS?

Android 9+ (Private DNS, uses DNS over TLS per RFC 7858): Go to Settings → Network & internet → Advanced → Private DNS, select Private DNS provider hostname, and enter a provider hostname such as dns.google (Google) or 1dot1dot1dot1.cloudflare-dns.com (Cloudflare).

Android, per Wi-Fi network: Long-press the network in Wi-Fi settings → Modify network → Advanced options → set IP settings to Static → enter DNS 1 and DNS 2. This only applies to that specific Wi-Fi network, not cellular data.

iOS/iPadOS, per Wi-Fi network: Go to Settings → Wi-Fi, tap the ⓘ next to the connected network, tap Configure DNS, switch to Manual, and add your server addresses. Native iOS settings only cover Wi-Fi — changing DNS for cellular data on iOS requires installing a resolver's dedicated app (e.g., the Cloudflare 1.1.1.1 app) or a DNS Settings configuration profile deployed via MDM.

How Do You Change DNS at the Router Level?

Changing DNS on the router applies it to every device on the network at once — no need to repeat the process on each phone, laptop, or smart-TV.

  1. Find your router's admin address. Common defaults are 192.168.1.1, 192.168.0.1, or 10.0.0.1. If you don't know yours, DNSnexus's Router IP Address guide covers how to find it per OS.
  2. Log in with the router's admin credentials (often printed on a label on the device, or set during initial setup).
  3. Locate DNS settings — usually under WAN, Internet, or DHCP Server settings, depending on the router brand.
  4. Enter the DNS addresses (e.g., 1.1.1.1 and 1.0.0.1) in the Primary/Secondary DNS fields, and save.
  5. Reboot the router, then disconnect and reconnect each client device (or wait for its DHCP lease to renew) so it picks up the new setting.

Mesh systems — Eero, Google Nest Wifi, TP-Link Deco, Asus ZenWiFi — typically expose this setting inside their companion mobile app, under Internet, Advanced, or DHCP settings rather than a browser-based admin panel.

How Do You Verify Your DNS Change Worked?

Run a direct resolver query and check which server actually answered — this confirms the change took effect at the OS or router level, not just that you saved a settings page.

Code
# Windows / macOS / Linux — check which server responds
nslookup example.com

# Output includes a "Server:" line — it should show your new
# resolver's IP (e.g., 1.1.1.1), not your ISP's old address.
Code
# dig gives more detail, including query time
dig example.com +noall +answer +stats

If the "Server" line still shows the old resolver, the OS or app hasn't picked up the change yet — see common problems below. You can also confirm a domain's authoritative records resolve consistently from your new setup using DNSnexus's DNS Lookup tool and check propagation across regions with the DNS Propagation Checker. For provider-specific confirmation, Cloudflare offers a dedicated check at 1.1.1.1/help that reports whether your traffic is using their resolver.

How Do You Fix Common DNS Change Problems?

ProblemLikely CauseFix
Old DNS server still responds after changeStale local DNS cacheFlush the cache — see the DNS cache flush guide
Change doesn't apply on a specific deviceDevice is connected to a VPN overriding DNSDisconnect the VPN, or set DNS inside the VPN client's settings
Router-level change didn't reach all devicesDevices are holding an old DHCP leaseReboot each device, or run ipconfig /renew (Windows) to force a new lease
Only some sites fail to resolveNew resolver blocks the domain (malware/family filter)Switch to an unfiltered resolver like Cloudflare or Google, or whitelist the domain if your resolver supports it
DNS queries time out entirelyISP is blocking outbound port 53 trafficUse DNS over HTTPS (DoH) or DNS over TLS (DoT) instead of plain DNS — see Android Private DNS above
Resolver responds but is slowChosen resolver has no nearby anycast node for your regionTest alternatives — see the DNS server not responding guide for a full diagnostic flow

One interpretation worth calling out: most "DNS didn't change" reports trace back to a cached lookup, not a failed configuration — flushing the cache resolves the majority of them without touching network settings again.

Key Takeaways

  • ✓ Changing DNS is a network-settings edit, not a system reinstall — it takes under two minutes per device.
  • ✓ Cloudflare (1.1.1.1), Google (8.8.8.8), and Quad9 (9.9.9.9) are the three most common public resolver choices.
  • ✓ Router-level changes apply to every device on the network; device-level changes apply only to that device.
  • ✓ Android 9+ and iOS both support DNS over TLS/HTTPS for encrypted queries — plain port-53 DNS is unencrypted by default.
  • ✓ Always verify with nslookup or dig after changing — a saved settings page doesn't guarantee the OS picked up the change immediately.

Frequently Asked Questions

Q: Is it safe to change my DNS server?

Yes, as long as you use a reputable resolver. Reputable providers like Cloudflare, Google, and Quad9 publish public no-logs or limited-retention policies. Avoid unknown or free "fast DNS" services that don't disclose a privacy policy, since they can see every domain you query.

Q: Does changing DNS servers make my internet faster?

Sometimes. DNS only affects the time it takes to resolve a domain name to an IP address, not your download or upload bandwidth. A resolver with a closer anycast node or better caching can shave milliseconds off page-load starts, but it won't change your connection speed itself.

Q: What's the difference between changing DNS on my device versus my router?

A device-level change (Windows, Mac, phone) affects only that device and only on networks where it isn't overridden by DHCP. A router-level change affects every device that connects to that network, including guests, unless a device has its own manual DNS override.

Q: Will changing my DNS server hide my browsing from my ISP?

Only partially. It stops your ISP from seeing DNS query logs, but your ISP can still see which IP addresses you connect to via the underlying traffic, unless you also use a VPN or your traffic is fully encrypted end-to-end (HTTPS + encrypted SNI/ECH).

Q: Do I need to set both IPv4 and IPv6 DNS addresses?

If your network uses IPv6 (most modern ISPs and routers do), yes — a device that only has IPv4 DNS set may still resolve via a different, unconfigured IPv6 resolver if IPv6 is preferred locally. Setting both keeps the behavior consistent.

Q: How do I revert to my ISP's default DNS server?

Switch the DNS setting back from "Manual" to "Automatic" (or "Obtain DNS server address automatically") in the same settings screen you used to change it — see the PowerShell or networksetup revert commands above for a scripted option.

Q: What DNS server is best for gaming or low latency?

Cloudflare (1.1.1.1) and Google (8.8.8.8) both run large anycast networks with consistently low query latency in most regions. The bigger latency factor for gaming is usually your game server's network path, not DNS resolution time, since DNS lookups are cached after the first query.

Next Steps

Once your new DNS servers are set, confirm they're actually being used with a DNS Lookup or check your domain's authoritative records with NS Lookup. If you administer a domain rather than just a device, DNSnexus's DNS Propagation Checker shows how your DNS changes are seen globally, and Reverse DNS helps confirm PTR records for mail and server setups.

Related Guides

  • How to Flush Your DNS Cache
  • What Is DNS Cache?
  • DNS Server Not Responding: How to Fix It
  • How to Find Your Router's IP Address
Free Newsletter

Get guides like this by email

DNS, email auth, and security playbooks delivered when they publish. No spam.

On this page
  • Why Change Your DNS Servers?
  • Which Public DNS Server Should You Use?
  • How Do You Change DNS Servers on Windows?
  • How Do You Change DNS Servers on macOS?
  • How Do You Change DNS Servers on Linux?
  • How Do You Change DNS Servers on Android and iOS?
  • How Do You Change DNS at the Router Level?
  • How Do You Verify Your DNS Change Worked?
  • How Do You Fix Common DNS Change Problems?
  • Key Takeaways
  • Frequently Asked Questions
  • Next Steps
Related links
Dns LookupNs LookupDns Propagation CheckerReverse DnsHow To Flush Dns CacheWhat Is Dns Cache
Related Tools
DNS Propagation Checker→DNS Check→DNS Lookup→A Record Lookup→