TL;DR
Your internet service provider (ISP) automatically assigns you DNS servers. Switching to a public DNS server like Cloudflare, Google Public DNS, or OpenDNS can improve your browsing speed and security. This guide shows you how.
What is DNS?
DNS (Domain Name System) translates website names (like google.com) into IP addresses (like 142.250.185.142), which computers use to find websites. Your ISP provides these servers, but they aren’t always the fastest or most secure.
Why Switch DNS Servers?
- Speed: Public DNS servers are often faster than those provided by your ISP.
- Reliability: They have more robust infrastructure and less downtime.
- Security: Some public DNS servers offer extra security features, like blocking malicious websites.
- Privacy: While not a complete privacy solution, some providers focus on minimizing data logging.
How to Change Your DNS Servers
The process varies depending on your operating system and device.
1. Windows
- Open the Control Panel. (Search for ‘Control Panel’ in the Start Menu).
- Go to Network and Internet > Network and Sharing Center.
- Click on your active network connection (usually Wi-Fi or Ethernet).
- Click Properties.
- Select Internet Protocol Version 4 (TCP/IPv4), then click Properties.
- Choose Use the following DNS server addresses:
- Enter your preferred and alternate DNS servers. Here are some popular options:
- Cloudflare: Preferred DNS server: 1.1.1.1, Alternate DNS server: 1.0.0.1
- Google Public DNS: Preferred DNS server: 8.8.8.8, Alternate DNS server: 8.8.4.4
- OpenDNS: Preferred DNS server: 208.67.222.222, Alternate DNS server: 208.67.220.220
- Click OK on all windows to save your changes.
You may need to flush the DNS cache after changing servers. Open Command Prompt as administrator and run:
ipconfig /flushdns
2. macOS
- Open System Preferences > Network.
- Select your active network connection (Wi-Fi or Ethernet).
- Click Advanced…
- Go to the DNS tab.
- Click the + button to add new DNS servers. Add the preferred and alternate addresses from the list above.
- Click OK, then click Apply.
You may need to flush the DNS cache after changing servers. Open Terminal and run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
3. Android
(Note: The exact steps vary depending on your Android version and manufacturer.)
- Open Settings > Connections (or similar).
- Select your Wi-Fi network.
- Tap the settings icon next to the network name.
- Choose Advanced options or IP Settings.
- Change from DHCP to Static IP.
- Enter your preferred and alternate DNS servers in the DNS 1 and DNS 2 fields.
- Save your changes.
4. iOS (iPhone/iPad)
- Open Settings > Wi-Fi.
- Tap the information icon next to your Wi-Fi network name.
- Scroll down and tap Configure DNS.
- Change from Automatic to Manual.
- Remove any existing DNS servers by tapping the red minus button.
- Add new DNS servers by tapping Add Server and entering the preferred and alternate addresses.
- Tap Save.
Testing Your New DNS Servers
After changing your DNS servers, it’s a good idea to test if they are working correctly.
- Visit a website like DNSLeakTest.
- Run the standard test. The results should show the DNS servers you configured, not your ISP’s servers.

