User Agents

Web browsers and everyday web tech, explained

Change DNS Server: How to Do It on Any Device

· 6 min read · How the Web Works

In this article
  1. What Is a DNS Server and Why Change It?
  2. How DNS Works: A Quick Background
  3. How to Change DNS on Windows 10 and 11
  4. How to Change DNS on macOS
  5. How to Change DNS on Android and iOS
  6. How to Change DNS on Your Router
  7. How to Choose a DNS Provider
  8. Common Problems and Troubleshooting
  9. Frequently Asked Questions

Changing your DNS server is a quick way to improve browsing speed, reliability, and privacy on almost any device. You can do it in your router settings (affects every connected device) or individually on Windows, macOS, Android, iOS, and Linux. This guide explains what DNS is, how to change it, and what to consider before you do.

What Is a DNS Server and Why Change It?

DNS (Domain Name System) is the internet's phonebook. When you type a domain like example.com, your device asks a DNS server to translate that name into an IP address (e.g., 93.184.216.34) so it can connect. Your internet service provider (ISP) assigns a DNS server by default, but it may be slow, unreliable, or log your browsing history.

Changing to a public DNS provider—such as Google Public DNS, Cloudflare, or Quad9—can offer:

  • Speed: Some providers have faster response times or better global infrastructure.
  • Reliability: ISPs occasionally have outages; a third-party server may stay up.
  • Privacy: Many public DNS providers have strict no-logging policies.
  • Security: Some providers block malicious domains automatically.

However, speed gains are often modest because DNS lookups are cached. The main benefits are usually privacy and security.

How DNS Works: A Quick Background

When you request a website, your device first checks its local cache. If not found, it queries a recursive resolver (the DNS server you set). That resolver follows a chain: root servers → TLD servers (like .com) → authoritative name servers for the domain. The final IP is returned and cached for a period called TTL (time-to-live).

Your ISP's DNS is the default because it's automatically configured via DHCP. But you can override it manually on any device. The setting is usually under network adapter properties, Wi-Fi settings, or router configuration.

How to Change DNS on Windows 10 and 11

  1. Open Settings → Network & Internet → Wi-Fi (or Ethernet).
  2. Click on your connected network name.
  3. Scroll down to DNS server assignment and click Edit.
  4. Change the dropdown from Automatic (DHCP) to Manual.
  5. Turn on IPv4 and enter the preferred and alternate DNS addresses (e.g., Cloudflare: 1.1.1.1 and 1.0.0.1).
  6. Optionally enable IPv6 and enter the IPv6 addresses if your provider supports it.
  7. Click Save and restart your browser or flush DNS cache with ipconfig /flushdns.

If you prefer the classic Control Panel method: go to Network Connections, right-click your adapter, select Properties, double-click Internet Protocol Version 4 (TCP/IPv4), and choose “Use the following DNS server addresses.”

How to Change DNS on macOS

  1. Open System Settings (or System Preferences on older versions).
  2. Click Network.
  3. Select your active connection (Wi-Fi or Ethernet) and click Details.
  4. Go to the DNS tab.
  5. Click the + button to add a DNS server (e.g., 8.8.8.8 for Google).
  6. Remove existing entries if you want to replace them.
  7. Click OK and then Apply.

You can also use the terminal: networksetup -setdnsservers Wi-Fi 1.1.1.1 1.0.0.1.

How to Change DNS on Android and iOS

Android: Go to Settings → Wi-Fi → long-press your network → Modify network → Advanced options → change IP settings to Static → enter DNS addresses in the DNS fields. Note that this may not work on all Android versions; some use private DNS settings (Settings → Network & internet → Private DNS) where you can enter a hostname like dns.google.

iOS: Go to Settings → Wi-Fi → tap the “i” next to your network → scroll to Configure DNS → switch to Manual → add DNS servers. iOS also supports DNS profiles (e.g., from Cloudflare or NextDNS) that can be installed via configuration profiles.

How to Change DNS on Your Router

Changing DNS on your router affects all devices that connect to it, which is more efficient than changing each device individually.

  1. Find your router's IP address (often 192.168.1.1 or 192.168.0.1) and log in to its admin panel.
  2. Look for a section called WAN, Internet, or Network Settings.
  3. Find the DNS settings (sometimes under “DHCP” or “Connection Type”).
  4. Change from “Obtain automatically” to “Use custom DNS” and enter the addresses.
  5. Save and reboot the router.

If you don't know the router's IP, check the sticker on the router or run ipconfig (Windows) and look for the “Default Gateway.”

How to Choose a DNS Provider

There are several reputable public DNS providers, each with different focuses:

  • Google Public DNS: 8.8.8.8 and 8.8.4.4. Known for speed and reliability, but logs some data (for security).
  • Cloudflare: 1.1.1.1 and 1.0.0.1. Emphasizes privacy and speed; has a consumer app.
  • Quad9: 9.9.9.9. Blocks malicious domains by default.
  • OpenDNS: 208.67.222.222 and 208.67.220.220. Offers parental controls and phishing protection.
  • Comodo: 8.26.56.26 and 8.20.209.20. Security-focused.

To compare speeds, you can use tools like namebench (open-source) or simply try a provider for a few days. Note that your geographic location and ISP can affect performance.

Common Problems and Troubleshooting

Problem: Internet stops working after changing DNS. Double-check that you typed the addresses correctly. Try using your ISP's DNS temporarily. If it works, the new DNS may be blocked by your network (e.g., some public Wi-Fi blocks custom DNS).

Problem: DNS changes don't stick. Some devices (like certain Android phones) may revert to automatic DNS. On Windows, ensure you changed the correct adapter (e.g., Wi-Fi vs. Ethernet). On routers, check if your ISP forces its own DNS via DHCP.

Problem: Websites load slowly after change. Clear your DNS cache: on Windows ipconfig /flushdns, on macOS sudo dscacheutil -flushcache. Also, try a different provider—some may have poor routing in your region.

Misconception: Changing DNS makes you anonymous. DNS only translates names; your IP address is still visible to websites. For anonymity, use a VPN or Tor.

Frequently Asked Questions

Is changing DNS safe?

Yes, using reputable public DNS servers is generally safe. However, avoid unknown or untrusted DNS servers that could hijack your queries. Stick to well-known providers.

Will changing DNS speed up my internet?

It may reduce the time to resolve domain names, but once cached, the difference is negligible. If your ISP's DNS is overloaded or slow, you might see a noticeable improvement.

Do I need to change DNS on every device?

No. Changing it on your router applies to all devices on your home network. For individual devices outside your network (like your phone on cellular), you'd need to change it on that device.

What is the difference between IPv4 and IPv6 DNS?

IPv4 uses 32-bit addresses (like 8.8.8.8), while IPv6 uses 128-bit (like 2001:4860:4860::8888). Most networks still use IPv4, but if your ISP supports IPv6, you can set both.

Can I use a DNS server from another country?

Yes, but it may be slower due to distance. Also, some streaming services use DNS to detect your location; using a foreign DNS might cause geo-blocking errors.

How do I revert to automatic DNS?

Simply go back to the same settings and select “Obtain DNS server address automatically” (or “Automatic (DHCP)”). On routers, choose “Obtain automatically from ISP.”