Change DNS Settings: Windows, Mac, iOS, Android
Jump to your platform: Windows 10 & 11 · macOS · Linux · iOS · Android · Router. Already changed them? Verify the change took effect.
Your device asks a DNS server to turn every domain name you type into an IP address. Which server it asks is a setting you control, and changing it can make browsing measurably faster, block a category of hijacking attacks, and stop your ISP from seeing every site you look up.
Below are the exact steps for Windows 10 and 11, macOS, Linux, iOS, Android and your router, followed by how to check the change actually took effect. It takes about two minutes on any of them.
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:
Need one for a specific region? See the full list of public DNS servers by country.
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:
The quickest check is to check propagation across global resolvers and confirm the answers come from the servers you set.
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:
If the steps below do not help, it is worth understanding how DNS resolution actually works before changing anything else.
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.
One thing this guide does not cover
Everything above changes which DNS server your device asks. That is a resolver setting, and it only affects you.
If you also own a domain, there is a second set of DNS records: the ones that answer for your domain when anyone else looks it up. Those live at your registrar or DNS host, and nothing tells you when they change. A wrong MX record silently reroutes your email. An expired certificate or a lapsed registration takes the domain down. In practice people find out from a customer.
Run a free scan of a domain you own: it reads every record from every authoritative nameserver, checks your certificates, and grades the domain against 47 security checks. No signup, no card.
If you want the same checks to keep running, DNS Spy re-resolves every monitored domain at least every ten minutes and alerts you when a record changes. See how monitoring works.