Network security

How to Change DNS on Windows, Mac, iPhone, Android and Your Router

Changing your DNS takes about two minutes and can fix broken websites, speed up lookups and add filtering. Here are the exact steps for every device.

Cysoro Security TeamPublished · 9 min read
1.1.1.1 8.8.8.8Google DNS 9.9.9.9Quad9 2 minutesper device NETWORK SECURITY How tochangeDNS Every device, step by step.
Quick answer

To change DNS, open your device's network settings, switch DNS from automatic to manual, and enter two addresses from one provider — for example Cloudflare's 1.1.1.1 and 1.0.0.1, or Google's 8.8.8.8 and 8.8.4.4. Change it once on your router to cover every device at home, or change it per device to affect only that machine.

Key takeaways

  • Changing DNS on your router covers every device at home; changing it on one device affects only that device.
  • Cloudflare (1.1.1.1) and Google (8.8.8.8) are free, fast and unfiltered; Quad9 (9.9.9.9) also blocks known malicious domains.
  • Always enter two addresses from the same provider and verify the change with a DNS leak test afterwards.

Every time you type a website address, your device asks a DNS server to translate that name into an IP address — the internet's phone book. By default you use your internet provider's DNS, but you are not stuck with it. Switching to a public resolver takes about two minutes, and it can fix websites that will not load, speed up lookups and add malware blocking.

What is DNS, and why would you change it?

DNS stands for Domain Name System. It turns human-readable names like example.com into IP addresses like 93.184.216.34 that computers use to connect. Your device asks a DNS resolver to do this lookup for every new site you visit.

Most people use their internet provider's resolver because it is the default. People switch for four reasons: their provider's DNS is slow or unreliable, a site is blocked or misbehaving at the DNS level, they want a resolver that blocks malicious domains, or they want encrypted lookups their provider does not offer. A new resolver will not fix a slow connection or bypass every block, but it solves a surprising number of "this site won't load" problems.

How a DNS lookup works1. Your deviceyou typeexample.com2. DNS resolverlooks up the nameand returns an IP3. Websiteyour device connectsdirectly to the IPChanging DNS only changes step 2 — who answers the lookup.Your traffic still goes to the same websites; only the phone book changes.That is why a bad resolver can redirect you — and why you should only use trusted ones.
A DNS lookup in three steps. Changing DNS swaps the resolver in step 2. Illustration by Cysoro.

Before you start, write down your current settings. Every method below is reversible, but having the old values noted down makes going back trivial. You will also need two addresses from one provider — a primary and a secondary — so the second answers when the first does not.

Which DNS provider should you choose?

There is no single best resolver for everyone. The right choice depends on whether you value speed, privacy, malware blocking or simplicity. These four are the most widely used free options, and all of them support encrypted DNS.

ProviderPrimary · Secondary (IPv4)Encrypted DNS hostnameBest for
Cloudflare1.1.1.1 · 1.0.0.1one.one.one.oneSpeed and privacy, nothing blocked
Google Public DNS8.8.8.8 · 8.8.4.4dns.googleReliability, works everywhere
Quad99.9.9.9 · 149.112.112.112dns.quad9.netBlocking known malicious domains
AdGuard DNS94.140.14.14 · 94.140.15.15dns.adguard.comBlocking ads and trackers too

Cloudflare publishes IPv6 addresses as well — 2606:4700:4700::1111 and 2606:4700:4700::1001 — and Google's are 2001:4860:4860::8888 and 2001:4860:4860::8844. Most home users only need the IPv4 addresses. For this guide we use Cloudflare as the example, but the steps are identical for any provider: just swap in that provider's addresses.

A note on privacy: every resolver can see which domains you look up. Cloudflare states it deletes query logs within 24 hours and does not sell browsing data. Google's public DNS logs are anonymized and used to run the service. Read the provider's privacy policy if that matters to you — it should. The IPMines guide to changing DNS has a fuller resolver table if you want to compare more options.

How to change DNS on Windows 11 and Windows 10

On Windows, you change DNS in the properties of your active network connection, and the change applies to that one PC. On Windows 11, you can also turn on DNS over HTTPS from the same screen, which encrypts your lookups.

Windows 11

  1. Open Settings, then Network & internet.
  2. Click Wi-Fi or Ethernet, depending on how you are connected. For Wi-Fi, open Hardware properties.
  3. Next to DNS server assignment, click Edit and switch the dropdown to Manual.
  4. Turn on IPv4 and enter your preferred and alternate DNS addresses, for example 1.1.1.1 and 1.0.0.1.
  5. In the DNS over HTTPS menu, choose On (automatic template) to encrypt queries, then click Save.
  6. Open Command Prompt and run ipconfig /flushdns to clear the old cached lookups.

Windows 10

  1. Open Settings, then Network & Internet, then Change adapter options. (Or press Windows + R, type ncpa.cpl and press Enter.)
  2. Right-click your active connection and choose Properties.
  3. Select Internet Protocol Version 4 (TCP/IPv4), then click Properties.
  4. Choose Use the following DNS server addresses and enter the preferred and alternate addresses.
  5. Click OK on each window. The change takes effect right away; no restart is needed.

If the fields are greyed out, you are not an administrator on that PC, or the machine is managed by your employer. On a work laptop, ask IT before changing network settings — your company may route DNS through its own security filtering on purpose.

How to change DNS on a Mac

Apple tucks DNS behind a Details button, but the process is quick on any recent version of macOS. The change applies to the network you edit, so repeat it for each Wi-Fi network you use regularly.

  1. Click the Apple menu and open System Settings.
  2. Click Network, then select Wi-Fi or your wired connection.
  3. Click Details… next to the connected network, then choose DNS.
  4. Click + under DNS Servers to add each address, and use − to remove the old ones.
  5. Click OK. The new servers take effect immediately.

On macOS Monterey or earlier, the path is System Preferences, then Network, then Advanced, then DNS. The same add-and-remove idea applies. You can check the result with our free DNS lookup tool, which shows which records a domain resolves to.

How to change DNS on iPhone and Android

Phones handle DNS differently from computers, and this is where most people get stuck. On iPhone the setting is per Wi-Fi network; on Android it is a single encrypted setting that covers Wi-Fi and mobile data.

iPhone and iPad

  1. Open Settings, then Wi-Fi.
  2. Tap the info icon (i) next to your network.
  3. Scroll down and tap Configure DNS, then switch it to Manual.
  4. Delete the existing servers, tap Add Server, and enter each new address.
  5. Tap Save in the top-right corner.

Apple limits DNS changes to individual Wi-Fi networks. Mobile data always uses your carrier's DNS unless you install an app, such as Cloudflare's free 1.1.1.1 app, which routes all DNS through an encrypted tunnel.

Android

  1. Open Settings, then Network & internet, then Private DNS. On Samsung phones, look under Connections, then More connection settings.
  2. Select Private DNS provider hostname.
  3. Enter a hostname — not an IP address — such as one.one.one.one for Cloudflare, dns.google for Google, or dns.quad9.net for Quad9.
  4. Tap Save.

Android's Private DNS uses DNS over TLS, so your lookups are encrypted, and it works on both Wi-Fi and mobile data. That makes it the simplest phone setup of the lot: one setting, every network covered. To undo it, set Private DNS back to Automatic.

How to change DNS on your router (covers every device)

Changing DNS once on the router applies it to every device on your network — phones, laptops, consoles and smart TVs — without touching each one. This is the best option for a household, and it is the one to pick if you want malware-blocking DNS to protect devices that have no settings of their own.

  1. Find your router's address: it is usually 192.168.1.1, 192.168.0.1 or 10.0.0.1, printed on the label on the router itself. Type it into a browser and log in with the password on that label.
  2. Find the DNS setting, usually under Internet, WAN, DHCP or Advanced. The exact menu varies by brand.
  3. Switch DNS from Automatic to Manual (or Use the following DNS addresses) and enter the two addresses.
  4. Save, then restart the router so every device picks up the new settings.
Router change vs. per-device changeChange it on the router• Every device covered at once• Protects TVs and smart devices• One setting to maintain• Needs the router admin login• Only applies at homeChange it per device• Only that device changes• Travels with you anywhere• No router access needed• Must repeat on each device• Good for one laptop or phone
Router DNS covers the whole household; per-device DNS follows you. Illustration by Cysoro.

Two warnings. First, some ISP-supplied routers hide or lock the DNS setting, or reset it after a firmware update — if you cannot find it, change DNS per device instead. Second, if you change the router DNS and a device still uses the old resolver, that device probably has a manual DNS setting of its own, which overrides the router. Set the device back to automatic and it will follow the router.

If your router is also your Wi-Fi security weak point, our guide to how to secure your Wi-Fi covers the admin password, firmware updates and guest network settings that matter more than DNS alone.

How do you check the DNS change worked?

Do not assume the change took effect — verify it in under a minute. The simplest check is a DNS leak test website: open one, run the test, and look at which servers answer. If the results show Cloudflare, Google or Quad9 servers instead of your ISP's, the change worked. The WhatIsMyIPNow guide walks through the same verification steps for every device.

You can also verify from the command line. On Windows, run nslookup example.com in Command Prompt and read the "Server" line at the top — it shows the resolver answering. On Mac or Linux, run scutil --dns | grep nameserver or check the DNS section in System Settings.

Also confirm that websites still load normally. Visit a few sites you use daily, including one you have never visited, so the result is not served from cache. If a site fails, the resolver may be unreachable from your network — switch back to automatic and try another provider.

What should you do if changing DNS breaks something?

Most DNS problems have boring causes. Work through them in order before assuming the resolver is at fault.

  • One site will not load, everything else works: the site itself may be down, or the new resolver may block it. Try the site with your old DNS, or switch to a non-filtering resolver like Cloudflare or Google.
  • Nothing loads after the change: you probably typed an address wrong, or your network blocks that resolver. Double-check both addresses, then revert to automatic.
  • Some devices still use the old DNS: restart the device, or flush its DNS cache. On Windows, run ipconfig /flushdns. Browsers also cache DNS, so restart the browser too.
  • Parental controls or work filtering stopped working: your old DNS may have been doing the filtering. If you used your ISP's family-safe DNS, switching to an unfiltered resolver removes that protection — use a filtering resolver instead, or re-enable controls on the router.
  • Streaming or banking sites behave oddly: a few services use DNS to route you to a nearby server, and a distant resolver can send you to a farther one. If a specific service gets slower, that provider may not suit your location.

None of these are permanent. Reverting to automatic restores your ISP's DNS immediately, which is why noting down the original settings first is worth the thirty seconds.

Should you turn on encrypted DNS?

Yes, if your device offers it — it is free and it closes a real privacy gap. Ordinary DNS lookups are sent in plain text, so anyone on your network can see which domains you request. DNS over HTTPS (DoH) and DNS over TLS (DoT) encrypt those lookups.

Windows 11 lets you enable DoH in the same DNS settings screen. Android's Private DNS is DoT by default. On iPhone, encrypted DNS needs a configuration profile or an app. On the router, look for a DoH or DoT option in the DNS settings; many modern routers offer it.

Encrypted DNS does not make you anonymous. Your ISP can still see the IP addresses you connect to, and the websites you visit know who you are when you log in.

It hides the lookup itself, which stops casual snooping on shared Wi-Fi and prevents tampering with answers in transit. For a fuller picture of what else leaks on a network, check your setup with our what-is-my-IP tool.

Cloud threat hunting teams treat unencrypted DNS as a detection gap too — our explainer on what cloud threat hunting is shows how attackers abuse DNS in cloud environments.

The bottom line

Changing DNS is a small, reversible change with outsized troubleshooting value. Pick one reputable provider, enter both of its addresses, and change it on the router if you want the whole household covered. Cloudflare's 1.1.1.1 and Google's 8.8.8.8 suit most people; Quad9 adds malware blocking if you want it.

After the change, verify it with a leak test and a couple of real websites. If something breaks, revert to automatic and try another provider. You can confirm your new resolver is answering correctly with the free DNS lookup tool.

Frequently asked questions

What DNS should I change to?

For most people, Cloudflare (1.1.1.1 and 1.0.0.1) or Google (8.8.8.8 and 8.8.4.4) are good defaults: both are free, fast and do not block websites. Choose Quad9 (9.9.9.9) if you want malicious domains blocked automatically.

Is it safe to change DNS?

Yes, if you use a reputable public resolver such as Cloudflare, Google or Quad9. Never use DNS addresses from a random website or forum post, because a malicious resolver can redirect you to fake versions of real sites.

Will changing DNS make my internet faster?

Sometimes, slightly. A faster resolver answers lookups in fewer milliseconds, which can make websites feel snappier. It does not increase your download speed, and on a good connection you may notice no difference at all.

Why is my DNS change not working?

The most common causes are a cached old address, changing DNS on the wrong network adapter, or the router overriding your device setting. Flush the DNS cache, restart the browser, and check that you edited the active connection.

Does changing DNS hide my browsing from my ISP?

Not on its own. Your ISP can still see the IP addresses you connect to unless you also use encrypted DNS (DNS over HTTPS or DNS over TLS) and a VPN. Encrypted DNS hides the lookup itself, which is a real improvement but not full anonymity.

Should I change DNS on my router or on each device?

Change it on the router if you want every device at home — phones, laptops, TVs and smart devices — to use the new resolver without touching each one. Change it per device if you only want the change on one machine, or if you cannot log in to the router.

How do I change DNS back to automatic?

Go back to the same setting and choose Automatic (DHCP) instead of Manual. On Android, set Private DNS to Automatic. On iPhone, choose Configure DNS and then Automatic. The device will use your ISP's resolver again.

Sources

  1. WhatIsMyIPNow — How to Change DNS
  2. WhatIsMyIPAddress — How to Change DNS on Windows, Mac, Android & iPhone
  3. IPMines — How to Change Your DNS Server
  4. The Core iTech — How to Change Your DNS Server
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against step-by-step guides from WhatIsMyIPNow, WhatIsMyIPAddress and IPMines, plus Cloudflare and Google public DNS addresses.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free