How to Change Your DNS Server on Any Device

4 min read
Beginner DNS Privacy Speed Networking

Quick Answer: Change your DNS to Cloudflare (1.1.1.1 / 1.0.0.1) or Google (8.8.8.8 / 8.8.4.4). On Windows: Settings → Network → WiFi/Ethernet → DNS → Manual → enter the addresses. On Mac: System Settings → Network → WiFi → Details → DNS. On Android 9+: Settings → Network → Private DNS → enter one.one.one.one.

Your ISP assigns DNS servers automatically when you connect. These default DNS servers are often slow, sometimes unreliable, and may log every website you visit. Switching to a public DNS provider can make your browsing faster, more private, and more reliable.

Which DNS Server Should You Use?

Provider Primary Secondary Speed Privacy Extras
Cloudflare 1.1.1.1 1.0.0.1 Fastest No logging Blocks malware (1.1.1.2)
Google 8.8.8.8 8.8.4.4 Fast Logs some data Most reliable
Quad9 9.9.9.9 149.112.112.112 Fast No logging Blocks malicious domains
OpenDNS 208.67.222.222 208.67.220.220 Good Logs data Parental controls available

Our recommendation: Cloudflare (1.1.1.1) for speed and privacy. Google (8.8.8.8) if you want maximum reliability.

Change DNS on Windows

Windows 11

  1. Open SettingsNetwork & Internet
  2. Click WiFi (or Ethernet if wired)
  3. Click your connected network
  4. Click Edit next to DNS server assignment
  5. Change from "Automatic" to Manual
  6. Turn on IPv4
  7. Enter:
  • Preferred DNS: 1.1.1.1
  • Alternate DNS: 1.0.0.1
  1. Click Save

Windows 10

  1. Open SettingsNetwork & InternetChange adapter options
  2. Right-click your connection → Properties
  3. Select Internet Protocol Version 4 (TCP/IPv4)Properties
  4. Select Use the following DNS server addresses
  5. Enter:
  • Preferred: 1.1.1.1
  • Alternate: 1.0.0.1
  1. Click OK

Command Line (Any Windows)

netsh interface ip set dns "Wi-Fi" static 1.1.1.1
netsh interface ip add dns "Wi-Fi" 1.0.0.1 index=2

Replace Wi-Fi with your adapter name. Find it with netsh interface show interface.

Change DNS on Mac

  1. Open System SettingsNetwork
  2. Click WiFi (or your active connection)
  3. Click Details
  4. Click DNS in the sidebar
  5. Remove existing DNS servers (click the minus button)
  6. Click + and add 1.1.1.1
  7. Click + and add 1.0.0.1
  8. Click OK

Terminal Method

sudo networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1

Verify:

scutil --dns | head -10

To reset back to automatic (ISP DNS):

sudo networksetup -setdnsservers Wi-Fi Empty

Change DNS on iPhone

  1. SettingsWiFi
  2. Tap the (i) icon next to your connected network
  3. Scroll down to Configure DNS
  4. Change from Automatic to Manual
  5. Delete existing servers
  6. Tap Add Server → enter 1.1.1.1
  7. Tap Add Server → enter 1.0.0.1
  8. Tap Save

This only applies to this specific WiFi network. You need to repeat for each network you join. For system-wide DNS, use the Cloudflare 1.1.1.1 app or a DNS profile.

Change DNS on Android

Android 9+ (Private DNS — applies to all networks)

  1. SettingsNetwork & InternetPrivate DNS
  2. Select Private DNS provider hostname
  3. Enter: one.one.one.one (for Cloudflare) or dns.google (for Google)
  4. Tap Save

This uses DNS-over-TLS and works on all networks (WiFi and cellular).

Per-Network (Older Android or Manual)

  1. SettingsWiFi → long-press your network → Modify network
  2. Tap Advanced options
  3. Change IP settings to Static
  4. Enter DNS 1: 1.1.1.1 and DNS 2: 1.0.0.1
  5. Tap Save

Change DNS on Linux

systemd-resolved (Ubuntu, Fedora, etc.)

Edit the resolved config:

sudo nano /etc/systemd/resolved.conf

Add or change:

[Resolve]
DNS=1.1.1.1 1.0.0.1
FallbackDNS=8.8.8.8 8.8.4.4

Restart:

sudo systemctl restart systemd-resolved

Verify:

resolvectl status | grep "DNS Servers"

Direct resolv.conf (Simple Method)

echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf
echo "nameserver 1.0.0.1" | sudo tee -a /etc/resolv.conf

Warning: Some systems overwrite resolv.conf on reboot. Use the systemd-resolved method for a permanent change.

Change DNS on Your Router (All Devices at Once)

Changing DNS on your router applies to every device on your network automatically.

  1. Open your browser and go to your router's IP (usually 192.168.1.1 or 192.168.0.1)
  2. Log in (check the sticker on your router for credentials)
  3. Find DNS Settings — usually under:
  • WAN Settings → DNS
  • Internet → DNS
  • DHCP → DNS
  1. Change Primary DNS to 1.1.1.1
  2. Change Secondary DNS to 1.0.0.1
  3. Save and reboot the router

Verify Your DNS Changed

After changing DNS, verify it actually took effect:

  1. Use our DNS Toolbox to see which DNS servers your device is using
  2. Use What's My IP to check your connection
  3. If using a VPN, run our VPN Leak Test to make sure DNS is not leaking

DNS Not Changing? Troubleshooting

Problem Fix
DNS still shows ISP servers Flush DNS cache, then recheck
Works on WiFi but not cellular Change Android Private DNS setting
Router does not have DNS settings Some ISP routers lock this; change on each device instead
VPN overrides DNS Normal behavior — VPN pushes its own DNS
Browser using DoH Chrome/Firefox may bypass system DNS — check browser settings

See Also