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:
Open Settings by pressing
Win + Ior clicking the Start menu and selecting the gear iconNavigate to Network & Internet
Click on Wi-Fi or Ethernet depending on your connection type
Click on your active network connection
Scroll down and click Edit next to DNS server assignment
Change from Automatic to Manual
Toggle IPv4 to On
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)
Click Save
macOS
To change DNS settings on macOS:
Click the Apple menu and select System Settings (or System Preferences on older versions)
Click Network
Select your active network connection (Wi-Fi or Ethernet) from the left sidebar
Click Details (or Advanced on older versions)
Click the DNS tab
Click the + button below the DNS Servers list
Enter your preferred DNS server addresses (e.g., 8.8.8.8 and 8.8.4.4)
Click OK and then Apply
Linux (Ubuntu and Debian)
For Ubuntu and Debian-based distributions using NetworkManager:
Using GUI (GNOME/Ubuntu Desktop)
Click the network icon in the top-right corner
Select Settings or Network Settings
Click the gear icon next to your active connection
Go to the IPv4 tab
In the DNS section, toggle Automatic to Off
Enter your DNS servers separated by commas (e.g.,
8.8.8.8, 8.8.4.4)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:
Open the Settings app
Tap Wi-Fi
Tap the info icon (i) next to your connected network
Scroll down and tap Configure DNS
Tap Manual
Tap Add Server and enter your preferred DNS server (e.g., 8.8.8.8)
Tap Add Server again to add a secondary DNS server (e.g., 8.8.4.4)
Remove any automatic DNS servers by tapping the red minus icon
Tap Save
Android
Android DNS settings vary by version and manufacturer. Here are instructions for stock Android:
Android 9 and Later (Private DNS)
Open Settings
Tap Network & Internet
Tap Private DNS
Select Private DNS provider hostname
Enter a DNS-over-TLS hostname (e.g.,
dns.googlefor Google DNS)Tap Save
Per-Network DNS (All Android Versions)
Open Settings
Tap Network & Internet > Wi-Fi
Long-press your connected network and tap Modify network
Tap Advanced options
Change IP settings from DHCP to Static
Scroll down to DNS 1 and DNS 2
Enter your DNS servers (e.g., 8.8.8.8 and 8.8.4.4)
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:
Open a web browser and enter your router's IP address (commonly
192.168.1.1or192.168.0.1)Log in with your router's admin username and password (check the router label or manual if you don't know these)
Look for DNS settings under sections like:
Internet Settings
WAN Settings
Network Settings
Advanced Settings
Enter your preferred DNS server addresses in the Primary DNS and Secondary DNS fields
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 |
|
| Fast, reliable |
Cloudflare |
|
| Privacy-focused, fast |
Quad9 |
|
| Security, malware blocking |
OpenDNS |
|
| Content filtering, phishing protection |
AdGuard |
|
| Ad blocking, privacy |
Verifying Your DNS Settings
After changing your DNS settings, verify they're working correctly:
Flush your DNS cache:
Windows:
ipconfig /flushdnsmacOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponderLinux:
sudo systemd-resolve --flush-caches
Test your DNS resolution using online tools or command line:
Visit https://www.dnsleaktest.com/ to check which DNS servers you're using
Use
nslookupordigcommands to verify DNS resolution
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.