How to Change Your DNS Server Settings

Changing your DNS server settings can improve your internet speed, security, and privacy. This comprehensive guide provides step-by-step instructions for changing DNS settings on all major platforms including Windows, macOS, Linux, iOS, Android, and routers.

Why Change Your DNS Server?

Before diving into the instructions, here are some reasons to change your DNS server:

  • Faster internet browsing - Some DNS servers respond faster than your ISP's default servers

  • Enhanced security - DNS servers with built-in malware and phishing protection

  • Better privacy - DNS servers that don't log your browsing activity

  • Content filtering - Block adult content or ads at the DNS level

Windows 10 and Windows 11

Follow these steps to change DNS settings on Windows 10 or Windows 11:

  1. Open Settings by pressing Win + I or clicking the Start menu and selecting the gear icon

  2. Navigate to Network & Internet

  3. Click on Wi-Fi or Ethernet depending on your connection type

  4. Click on your active network connection

  5. Scroll down and click Edit next to DNS server assignment

  6. Change from Automatic to Manual

  7. Toggle IPv4 to On

  8. Enter your preferred DNS server addresses:

    • Preferred DNS: Enter the primary DNS server (e.g., 8.8.8.8 for Google DNS)

    • Alternate DNS: Enter the secondary DNS server (e.g., 8.8.4.4)

  9. Click Save

macOS

To change DNS settings on macOS:

  1. Click the Apple menu and select System Settings (or System Preferences on older versions)

  2. Click Network

  3. Select your active network connection (Wi-Fi or Ethernet) from the left sidebar

  4. Click Details (or Advanced on older versions)

  5. Click the DNS tab

  6. Click the + button below the DNS Servers list

  7. Enter your preferred DNS server addresses (e.g., 8.8.8.8 and 8.8.4.4)

  8. Click OK and then Apply

Linux (Ubuntu and Debian)

For Ubuntu and Debian-based distributions using NetworkManager:

Using GUI (GNOME/Ubuntu Desktop)

  1. Click the network icon in the top-right corner

  2. Select Settings or Network Settings

  3. Click the gear icon next to your active connection

  4. Go to the IPv4 tab

  5. In the DNS section, toggle Automatic to Off

  6. Enter your DNS servers separated by commas (e.g., 8.8.8.8, 8.8.4.4)

  7. Click Apply

Using Command Line

Edit the /etc/resolv.conf file:

sudo nano /etc/resolv.conf

Add these lines:

nameserver 8.8.8.8 nameserver 8.8.4.4

Note: Changes to /etc/resolv.conf may be overwritten by NetworkManager. For permanent changes, configure through NetworkManager or use /etc/systemd/resolved.conf on systems using systemd-resolved.

iOS

To change DNS settings on iPhone or iPad:

  1. Open the Settings app

  2. Tap Wi-Fi

  3. Tap the info icon (i) next to your connected network

  4. Scroll down and tap Configure DNS

  5. Tap Manual

  6. Tap Add Server and enter your preferred DNS server (e.g., 8.8.8.8)

  7. Tap Add Server again to add a secondary DNS server (e.g., 8.8.4.4)

  8. Remove any automatic DNS servers by tapping the red minus icon

  9. Tap Save

Android

Android DNS settings vary by version and manufacturer. Here are instructions for stock Android:

Android 9 and Later (Private DNS)

  1. Open Settings

  2. Tap Network & Internet

  3. Tap Private DNS

  4. Select Private DNS provider hostname

  5. Enter a DNS-over-TLS hostname (e.g., dns.google for Google DNS)

  6. Tap Save

Per-Network DNS (All Android Versions)

  1. Open Settings

  2. Tap Network & Internet > Wi-Fi

  3. Long-press your connected network and tap Modify network

  4. Tap Advanced options

  5. Change IP settings from DHCP to Static

  6. Scroll down to DNS 1 and DNS 2

  7. Enter your DNS servers (e.g., 8.8.8.8 and 8.8.4.4)

  8. Tap Save

Router Configuration

Changing DNS settings on your router affects all devices on your network. The exact steps vary by router manufacturer, but the general process is:

  1. Open a web browser and enter your router's IP address (commonly 192.168.1.1 or 192.168.0.1)

  2. Log in with your router's admin username and password (check the router label or manual if you don't know these)

  3. Look for DNS settings under sections like:

    • Internet Settings

    • WAN Settings

    • Network Settings

    • Advanced Settings

  4. Enter your preferred DNS server addresses in the Primary DNS and Secondary DNS fields

  5. Save the settings and reboot your router if required

Common Router Brands

  • TP-Link: Network > WAN > Primary/Secondary DNS

  • Netgear: Advanced > Setup > Internet Setup > DNS Address

  • Linksys: Connectivity > Internet Settings > Static DNS

  • ASUS: WAN > Internet Connection > WAN DNS Setting

  • D-Link: Setup > Internet > Manual Internet Connection Setup

Popular Public DNS Servers

Here are some popular public DNS servers you can use:

Provider

Primary DNS

Secondary DNS

Features

Google DNS

8.8.8.8

8.8.4.4

Fast, reliable

Cloudflare

1.1.1.1

1.0.0.1

Privacy-focused, fast

Quad9

9.9.9.9

149.112.112.112

Security, malware blocking

OpenDNS

208.67.222.222

208.67.220.220

Content filtering, phishing protection

AdGuard

94.140.14.14

94.140.15.15

Ad blocking, privacy

Verifying Your DNS Settings

After changing your DNS settings, verify they're working correctly:

  1. Flush your DNS cache:

    • Windows: ipconfig /flushdns

    • macOS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

    • Linux: sudo systemd-resolve --flush-caches

  2. Test your DNS resolution using online tools or command line:

  3. Browse a few websites to ensure everything is working correctly

Troubleshooting

If you experience issues after changing DNS settings:

  • Double-check that you entered the DNS addresses correctly

  • Restart your device or router to ensure changes take effect

  • Try a different DNS server if one isn't working

  • Revert to automatic DNS settings if problems persist

  • Check if your ISP or network blocks custom DNS servers

Conclusion

Changing your DNS server settings is a simple way to potentially improve your internet experience. Whether you're looking for faster speeds, better security, or enhanced privacy, the public DNS servers listed in this guide offer various benefits. Remember to test your connection after making changes and keep a note of your original settings in case you need to revert.

For more information about DNS and to monitor your DNS records, explore our public DNS servers list to find the best DNS servers for your needs.