🇺🇸 English
🇹🇼 繁體中文
🇨🇳 简体中文
🇯🇵 日本語
🇰🇷 한국어
🇪🇸 Español
🇫🇷 Français
🇩🇪 Deutsch
🇧🇷 Português
🇷🇺 Русский
🇮🇹 Italiano
🇳🇱 Nederlands
🇵🇱 Polski
🇹🇷 Türkçe
🇸🇦 العربية
🇹🇭 ไทย
🇻🇳 Tiếng Việt
🇮🇩 Indonesia
🇲🇾 Melayu
🇮🇳 हिन्दी

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:

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:

ProviderPrimarySecondaryBest For
Cloudflare1.1.1.11.0.0.1Speed & privacy
Google8.8.8.88.8.4.4Reliability & coverage
Quad99.9.9.9149.112.112.112Security (malware blocking)
OpenDNS208.67.222.222208.67.220.220Content filtering

IPv6 DNS Addresses

ProviderPrimarySecondary
Cloudflare2606:4700:4700::11112606:4700:4700::1001
Google2001:4860:4860::88882001:4860:4860::8844
Quad92620:fe::fe2620: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)

  1. Open Settings > Network & Internet > Wi-Fi (or Ethernet)
  2. Click your network connection, then click Hardware properties
  3. Next to DNS server assignment, click Edit
  4. Change from Automatic (DHCP) to Manual
  5. Enable IPv4 and enter: Preferred DNS: 1.1.1.1, Alternate DNS: 1.0.0.1
  6. Optionally enable IPv6 and enter the IPv6 DNS addresses
  7. 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

  1. Open System Settings (or System Preferences on older versions)
  2. Click Network in the sidebar
  3. Select your active connection (Wi-Fi or Ethernet) and click Details
  4. Click the DNS tab
  5. Click + to add DNS servers: 1.1.1.1 and 1.0.0.1
  6. Remove any existing ISP DNS entries by selecting them and clicking -
  7. 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)

  1. Open Settings > Network
  2. Click the gear icon next to your connection
  3. Go to the IPv4 tab
  4. Change DNS from Automatic to Manual
  5. Enter 1.1.1.1, 1.0.0.1
  6. 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

  1. Open Settings > Wi-Fi
  2. Tap the (i) icon next to your connected network
  3. Tap Configure DNS
  4. Change from Automatic to Manual
  5. Remove existing DNS servers, then tap Add Server
  6. Enter 1.1.1.1 and 1.0.0.1
  7. 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):

  1. Open Settings > Network & Internet > Private DNS
  2. Select Private DNS provider hostname
  3. Enter: one.one.one.one (Cloudflare) or dns.google (Google)
  4. Tap Save

Per-Network (Older Android)

  1. Open Settings > Wi-Fi
  2. Long-press your network > Modify network
  3. Check Show advanced options
  4. Change IP settings to Static
  5. Enter DNS 1: 1.1.1.1 and DNS 2: 1.0.0.1
  6. 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:

  1. Open a browser and go to your router's admin page (usually 192.168.1.1 or 192.168.0.1)
  2. Log in with your router credentials (check the sticker on your router if you have not changed them)
  3. Navigate to WAN or Internet settings
  4. Find the DNS Settings section
  5. Change from automatic/ISP to manual
  6. Enter Primary DNS: 1.1.1.1 and Secondary DNS: 1.0.0.1
  7. 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:

  1. DNS Lookup Tool: Use our DNS Lookup tool to query a domain and check which DNS server responds.
  2. 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.
  3. Command Line: On Windows: nslookup google.com — check the "Server" line. On macOS/Linux: dig google.com — check the "SERVER" line in the output.
DNS Lookup DNS Leak Test

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.