How to Change DNS Settings on Any Device

Step-by-step instructions to change DNS settings on every major platform including Windows, macOS, Linux, iOS, Android, and your router.

dns

How to Change DNS Settings on Any Device

DNS settings determine which server your device queries to translate domain names into IP addresses. By default, your device uses the DNS servers assigned by your ISP or network router. Changing these settings to use a faster, more private, or more secure resolver can improve browsing speed, enhance privacy, and protect against malicious domains.

This guide provides step-by-step instructions for every major platform, plus guidance on when and why to make the switch.

When and Why to Change DNS

There are several practical reasons to override your default DNS configuration:

Speed. ISP DNS resolvers are often slower than public alternatives like Cloudflare (1.1.1.1) or Google (8.8.8.8). Switching can noticeably reduce page load times, especially for DNS-heavy operations like email authentication checks.

Privacy. Your ISP can see every DNS query you make. Some ISPs log and sell this data. Public resolvers with no-logging policies and DNS-over-HTTPS (DoH) or DNS-over-TLS (DoT) support reduce this exposure.

Security. Resolvers like Quad9 (9.9.9.9) and Cloudflare's 1.1.1.2 block queries to known malicious domains, providing a passive layer of protection.

Reliability. ISP resolvers can go down during outages, breaking name resolution for your entire network even when upstream connectivity is fine. Public resolvers run on globally distributed infrastructure with high availability.

Troubleshooting. When diagnosing email infrastructure issues, using a well-known public resolver ensures your DNS queries are not affected by ISP-level caching or filtering. Verify your records with the InboxTooling DNS lookup tool.

Windows 10 and Windows 11

  1. Open Settings and navigate to Network & Internet.
  2. Select your active connection type: Wi-Fi or Ethernet.
  3. Click Hardware properties (Windows 11) or Change adapter options (Windows 10).
  4. Click Edit next to DNS server assignment.
  5. Switch from Automatic (DHCP) to Manual.
  6. Enable IPv4 and enter your preferred DNS addresses:
  7. Preferred: 1.1.1.1
  8. Alternate: 1.0.0.1
  9. Optionally enable IPv6 and enter IPv6 DNS addresses.
  10. If available (Windows 11), set DNS over HTTPS to On for encrypted queries.
  11. Click Save.

To flush the DNS cache after changing settings, open Command Prompt or PowerShell and run:

ipconfig /flushdns

macOS

  1. Open System Settings (macOS Ventura and later) or System Preferences (earlier versions).
  2. Navigate to Network.
  3. Select your active connection (Wi-Fi or Ethernet) and click Details (or Advanced).
  4. Click the DNS tab.
  5. Remove existing DNS servers by selecting them and clicking the minus button.
  6. Click the plus button and add your preferred servers:
  7. 8.8.8.8
  8. 8.8.4.4
  9. Click OK, then Apply.

Flush the DNS cache afterward:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Linux

DNS configuration on Linux depends on the distribution and network manager in use.

systemd-resolved (Ubuntu 18.04+, Fedora, Arch)

Edit the resolved configuration:

sudo nano /etc/systemd/resolved.conf

Add or modify these lines:

[Resolve]
DNS=9.9.9.9 149.112.112.112
FallbackDNS=1.1.1.1 1.0.0.1
DNSSEC=yes
DNSOverTLS=yes

Restart the service:

sudo systemctl restart systemd-resolved

NetworkManager

Open the connection editor or use the command line:

nmcli connection modify "Your Connection" ipv4.dns "1.1.1.1 1.0.0.1"
nmcli connection modify "Your Connection" ipv4.ignore-auto-dns yes
nmcli connection up "Your Connection"

Direct /etc/resolv.conf

On minimal systems without a network manager, edit /etc/resolv.conf directly:

nameserver 1.1.1.1
nameserver 1.0.0.1

Note that some systems overwrite this file on reboot. Use chattr +i /etc/resolv.conf to prevent overwriting, or configure DNS through your network manager instead.

iOS (iPhone and iPad)

  1. Open Settings and tap Wi-Fi.
  2. Tap the info icon (i) next to your connected network.
  3. Scroll to DNS and tap Configure DNS.
  4. Select Manual.
  5. Remove existing servers and add new ones:
  6. 1.1.1.1
  7. 1.0.0.1
  8. Tap Save.

Note that iOS DNS settings are per-network. You need to configure this for each Wi-Fi network you connect to. For system-wide DNS (including cellular), use a DNS profile app such as Cloudflare's 1.1.1.1 app or Apple's configuration profile mechanism.

Android

Android 9 (Pie) and Later -- Private DNS

Android 9 introduced a system-wide Private DNS setting that uses DNS-over-TLS:

  1. Open Settings and navigate to Network & Internet (or Connections).
  2. Tap Private DNS (may be under Advanced or More connection settings).
  3. Select Private DNS provider hostname.
  4. Enter the hostname for your chosen provider:
  5. Cloudflare: one.one.one.one
  6. Google: dns.google
  7. Quad9: dns.quad9.net
  8. Tap Save.

This setting applies to all networks (Wi-Fi and cellular) and encrypts all DNS queries via TLS.

Per-Network Configuration

  1. Open Settings and go to Wi-Fi.
  2. Long-press your connected network and select Modify network.
  3. Expand Advanced options.
  4. Change IP settings to Static.
  5. Enter your preferred DNS servers in the DNS 1 and DNS 2 fields.
  6. Save the configuration.

Note that static IP settings require you to also manually specify your IP address, gateway, and subnet mask.

Router-Level Configuration

Changing DNS at the router level applies the new resolver to every device on your network without needing to configure each one individually.

  1. Access your router's admin interface, typically at 192.168.1.1 or 192.168.0.1 in a web browser.
  2. Log in with your admin credentials.
  3. Navigate to the WAN, Internet, or DNS settings section (varies by manufacturer).
  4. Replace the ISP-assigned DNS servers with your preferred public resolver:
  5. Primary: 1.1.1.1
  6. Secondary: 8.8.8.8
  7. Save and reboot the router.

After the reboot, all devices using DHCP on the network will automatically use the new DNS servers. Devices with manually configured DNS settings will continue to use their own configuration.

Verifying the Change

After changing DNS settings, confirm the new resolver is active:

  • Windows: nslookup example.com -- check that the server listed matches your configured resolver.
  • macOS/Linux: dig example.com -- the "SERVER" line in the output shows which resolver responded.
  • All platforms: Use the InboxTooling DNS lookup tool to run queries and verify resolution from your network.

If results appear unchanged, your OS or browser may be caching old DNS responses. Flush your DNS cache (instructions above) and retry.


Stay on top of your email infrastructure. Sign up for the InboxTooling newsletter for deliverability tips, tool updates, and best practices.