How to Change DNS Server — Complete Guide
Step-by-step instructions to change DNS on every platform for faster, safer, and more private browsing
Table of Contents
1. What is DNS and Why Change It?
DNS (Domain Name System) is often called the "phone book of the internet." It translates human-readable domain names like google.com into IP addresses like 142.250.80.46 that computers use to communicate. Every time you visit a website, your device performs a DNS lookup to find the server's IP address.
By default, your device uses the DNS server provided by your ISP (Internet Service Provider). However, ISP DNS servers are often slow, may log your browsing history, and sometimes censor or redirect certain domains. Switching to a third-party DNS server can provide:
- Faster browsing: Public DNS providers like Cloudflare and Google operate global anycast networks that resolve queries faster than most ISP DNS servers.
- Better security: Providers like Quad9 automatically block known malicious domains, protecting you from phishing and malware.
- More privacy: Many public DNS providers support encrypted DNS (DoH/DoT) and have strict no-logging policies, unlike most ISPs.
- No censorship: Some ISPs block or redirect DNS queries to filter content. Using a third-party DNS bypasses these restrictions.
Try it now: Use our DNS Lookup tool to see which DNS server your device currently uses and how fast it resolves queries.
2. Best DNS Servers Compared
Here are the most popular public DNS servers. All are free and offer significantly better performance than most ISP DNS:
| Provider | Primary | Secondary | Best For |
|---|---|---|---|
| Cloudflare | 1.1.1.1 | 1.0.0.1 | Speed & privacy |
8.8.8.8 | 8.8.4.4 | Reliability & coverage | |
| Quad9 | 9.9.9.9 | 149.112.112.112 | Security (malware blocking) |
| OpenDNS | 208.67.222.222 | 208.67.220.220 | Content filtering |
IPv6 DNS Addresses
| Provider | Primary | Secondary |
|---|---|---|
| Cloudflare | 2606:4700:4700::1111 | 2606:4700:4700::1001 |
2001:4860:4860::8888 | 2001:4860:4860::8844 | |
| Quad9 | 2620:fe::fe | 2620:fe::9 |
Recommendation: For most users, Cloudflare 1.1.1.1 offers the best speed and privacy. If you want built-in malware protection, choose Quad9 9.9.9.9. For families needing content filtering, OpenDNS FamilyShield (208.67.222.123) blocks adult content automatically.
3. Change DNS on Windows 10/11
Method 1: Settings App (Windows 11)
- Open Settings > Network & Internet > Wi-Fi (or Ethernet)
- Click your network connection, then click Hardware properties
- Next to DNS server assignment, click Edit
- Change from Automatic (DHCP) to Manual
- Enable IPv4 and enter: Preferred DNS:
1.1.1.1, Alternate DNS:1.0.0.1 - Optionally enable IPv6 and enter the IPv6 DNS addresses
- Click Save
Method 2: Command Line
Open Command Prompt or PowerShell as Administrator and run:
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 "Ethernet" if using a wired connection. To verify, run ipconfig /all and check the DNS Servers line.
4. Change DNS on macOS
- Open System Settings (or System Preferences on older versions)
- Click Network in the sidebar
- Select your active connection (Wi-Fi or Ethernet) and click Details
- Click the DNS tab
- Click + to add DNS servers:
1.1.1.1and1.0.0.1 - Remove any existing ISP DNS entries by selecting them and clicking -
- Click OK, then Apply
Terminal Method
sudo networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1
To verify: scutil --dns | head -20. To revert to automatic DNS: sudo networksetup -setdnsservers Wi-Fi empty
5. Change DNS on Linux
Method 1: NetworkManager (Ubuntu/Fedora)
- Open Settings > Network
- Click the gear icon next to your connection
- Go to the IPv4 tab
- Change DNS from Automatic to Manual
- Enter
1.1.1.1, 1.0.0.1 - Click Apply and reconnect
Method 2: resolv.conf
sudo nano /etc/resolv.conf
Add: nameserver 1.1.1.1
Add: nameserver 1.0.0.1
Note: On modern Linux systems with systemd-resolved, /etc/resolv.conf is auto-generated. Use resolvectl or NetworkManager instead for persistent changes.
6. Change DNS on iPhone/iPad
- Open Settings > Wi-Fi
- Tap the (i) icon next to your connected network
- Tap Configure DNS
- Change from Automatic to Manual
- Remove existing DNS servers, then tap Add Server
- Enter
1.1.1.1and1.0.0.1 - Tap Save
Easier option: Install the 1.1.1.1 app from the App Store. It configures encrypted DNS (DoH) system-wide with a single tap, including on cellular networks, which the manual method above does not cover.
7. Change DNS on Android
Private DNS (Android 9+)
Android 9 and later include a system-wide Private DNS feature that uses DNS-over-TLS (DoT):
- Open Settings > Network & Internet > Private DNS
- Select Private DNS provider hostname
- Enter:
one.one.one.one(Cloudflare) ordns.google(Google) - Tap Save
Per-Network (Older Android)
- Open Settings > Wi-Fi
- Long-press your network > Modify network
- Check Show advanced options
- Change IP settings to Static
- Enter DNS 1:
1.1.1.1and DNS 2:1.0.0.1 - Tap Save
Best method: Private DNS (Android 9+) works across all networks including cellular, and encrypts your DNS queries automatically. It is the recommended approach.
8. Change DNS on Router
Changing DNS on your router applies the change to all devices on your network at once. This is the most efficient method for homes and offices:
- Open a browser and go to your router's admin page (usually
192.168.1.1or192.168.0.1) - Log in with your router credentials (check the sticker on your router if you have not changed them)
- Navigate to WAN or Internet settings
- Find the DNS Settings section
- Change from automatic/ISP to manual
- Enter Primary DNS:
1.1.1.1and Secondary DNS:1.0.0.1 - Save settings and reboot the router
Note: Some ISP-provided routers lock DNS settings. If you cannot change DNS on your router, configure DNS on each device individually or consider using your own router.
9. Verify Your DNS Change
After changing your DNS settings, it is important to verify the change took effect. Here are several ways to confirm:
- DNS Lookup Tool: Use our DNS Lookup tool to query a domain and check which DNS server responds.
- DNS Leak Test: Run our DNS Leak Test to see which DNS servers your device is actually using. If you changed to Cloudflare, you should see Cloudflare servers in the results.
- Command Line: On Windows:
nslookup google.com— check the "Server" line. On macOS/Linux:dig google.com— check the "SERVER" line in the output.
Tip: After changing DNS, flush your DNS cache to ensure the new settings take effect immediately. On Windows: ipconfig /flushdns. On macOS: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. On Linux: sudo resolvectl flush-caches.
10. Frequently Asked Questions
What is the best DNS server to use?
The best DNS server depends on your priorities. Cloudflare 1.1.1.1 is the fastest for most users. Google DNS 8.8.8.8 offers excellent reliability and global coverage. Quad9 9.9.9.9 provides built-in malware blocking. OpenDNS offers customizable content filtering. For most users, Cloudflare or Google DNS are the best general-purpose choices.
Will changing DNS make my internet faster?
Changing DNS can improve website loading speed by reducing DNS lookup time. DNS resolution happens before any web page loads, so a faster DNS server means quicker initial connections. However, DNS changes do not affect your actual download or upload bandwidth -- they only speed up the name resolution step. Users on slow ISP DNS servers typically see the biggest improvement.
Is it safe to change DNS server?
Yes, changing DNS to a reputable public provider like Google, Cloudflare, or Quad9 is safe and often more secure than using your ISP's default DNS. These providers offer DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) encryption, DNSSEC validation, and malware filtering. Avoid using unknown or untrusted DNS servers, as they could redirect your traffic to malicious sites.
How do I change DNS on my router?
Log into your router's admin panel (usually at 192.168.1.1 or 192.168.0.1), navigate to WAN or Internet settings, find the DNS settings section, and enter the DNS server addresses (e.g., 8.8.8.8 and 8.8.4.4 for Google DNS). Save the settings and reboot the router. This changes DNS for all devices connected to your network.
What is the difference between 1.1.1.1 and 8.8.8.8?
Both are free public DNS servers. 1.1.1.1 is operated by Cloudflare and is generally the fastest DNS resolver with a strong privacy focus -- they do not sell user data and purge logs within 24 hours. 8.8.8.8 is operated by Google and offers excellent reliability with broad global coverage. Both support DoH and DoT encryption for secure DNS queries.