Skip to main content
FixMyTech

How to Change DNS Settings on Windows, Mac and Phone

By

Published

8 min read

Share

Short answer

Set your DNS to 1.1.1.1 (Cloudflare) or 8.8.8.8 (Google) under Settings → Network on Windows, System Settings → Network → DNS on macOS, Settings → Wi-Fi → the i → Configure DNS on iPhone, or Private DNS on Android. It makes the first lookup for each new domain faster and fixes sites that fail to resolve. It does not increase your bandwidth.

On this page

DNS is the lookup that turns a domain name into an address. Your device asks a DNS server where example.com lives, gets a numeric answer back, and only then can it open a connection. Every new site you visit starts with that round trip.

By default your device uses whatever DNS server your provider hands out through the router. Those vary from excellent to slow and occasionally unreliable, which is the real reason to change: not speed in the sense people mean, but consistency.

Be clear about the limit up front. Changing DNS affects the lookup step, which takes tens of milliseconds. It does not touch the transfer that follows. Your speed test will not move.

Which servers to use

Provider Primary Secondary Notable for
Cloudflare 1.1.1.1 1.0.0.1 Fast, commits to not logging identifying query data
Google 8.8.8.8 8.8.4.4 Extremely reliable, very widely deployed
Quad9 9.9.9.9 149.112.112.112 Blocks known malicious domains
Cloudflare family 1.1.1.3 1.0.0.3 Blocks malware and adult content

Enter both the primary and secondary. The secondary is what your device falls back to when the first does not answer, and leaving it blank means a single failure takes your name resolution with it.

The IPv6 equivalents exist too — Cloudflare’s are 2606:4700:4700::1111 and 2606:4700:4700::1001. If your connection uses IPv6 and you only change the IPv4 servers, some lookups will still go to your provider.

Windows

Settings → Network & internet, then select Wi-Fi or Ethernet depending on how you are connected.

  1. Click Hardware properties (Wi-Fi) or your connection name (Ethernet).
  2. Beside DNS server assignment, click Edit.
  3. Change the dropdown from Automatic (DHCP) to Manual.
  4. Turn IPv4 on.
  5. Enter your preferred and alternate servers.
  6. Save.

Windows 11 also offers DNS over HTTPS in the same panel, as a dropdown beside each server. Setting it to On (automatic template) encrypts your lookups so nobody on the path can read them. Both Cloudflare and Google support it.

After changing, clear the cached entries:

ipconfig /flushdns

macOS

System Settings → Network → select your active connection → Details → DNS tab. (Ventura and later; earlier versions used System Preferences → Network → Advanced → DNS.)

  1. Click + under DNS Servers.
  2. Type the primary address, press Enter, then + again for the secondary.
  3. Remove the greyed-out entries inherited from the router if you want yours used exclusively.
  4. OK, then Apply.

Flush the cache from Terminal:

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

This setting is per network location, so a MacBook set up on home Wi-Fi reverts to automatic on a different network unless you set it there too.

iPhone and iPad

Per network, and it does not follow you to other Wi-Fi.

  1. Settings → Wi-Fi.
  2. Tap the blue i beside your network.
  3. Scroll to Configure DNS and tap it.
  4. Switch from Automatic to Manual.
  5. Delete the existing servers with the red minus buttons.
  6. Add Server, enter 1.1.1.1, then add 1.0.0.1.
  7. Save.

For something that applies everywhere including mobile data, install an encrypted DNS profile from Cloudflare or Quad9. Those install as a configuration profile under Settings → General → VPN & Device Management, and apply system wide.

There is no manual cache flush on iOS. Toggle airplane mode on and off, or restart.

Android

Android handles this differently from everyone else. Rather than per-network IP addresses, it offers Private DNS, which is DNS over TLS applied to the whole device including mobile data.

  1. Settings → Network & internet → scroll to Private DNS. On Samsung, Connections → More connection settings → Private DNS.
  2. Select Private DNS provider hostname.
  3. Enter a hostname, not an IP address:
    • Cloudflare: one.one.one.one
    • Google: dns.google
    • Quad9: dns.quad9.net
  4. Save.

This is the better option, because the lookups are encrypted and the setting survives moving between networks.

If you specifically want plain DNS on one Wi-Fi network only: Settings → Network & internet → Internet → the gear beside the network → Edit → expand Advanced options → set IP settings to Static. You then have to enter the device’s IP address, gateway and prefix length manually as well, which is fiddly and easy to get wrong. Private DNS is the right answer on Android.

Doing it once on the router instead

Setting DNS on the router applies it to everything that joins the network, including smart TVs, consoles and smart home devices that have no DNS settings of their own.

It is the more efficient approach for a household, with one caveat worth knowing about before you do it — changing DNS on the router covers where the setting lives and why some devices ignore it entirely.

Check it is actually being used

Changing the setting and confirming it took effect are different things, and a surprising number of devices quietly ignore what you entered.

Windows: run ipconfig /all and read the DNS Servers line for your active adapter. If it still lists your router’s address or your provider’s servers, the change did not apply.

Any platform: visit 1.1.1.1/help in a browser. Cloudflare’s page reports whether you are reaching it and whether the connection is encrypted. For other resolvers, a DNS leak test site shows which servers answered your lookups.

The usual reasons a change does not stick:

  • A VPN is connected, routing DNS through its own tunnel by design.
  • Your browser is using DNS over HTTPS independently. Chrome and Firefox can resolve names through their own encrypted resolver regardless of system settings, and Firefox enables it by default in some regions. The toggle is in the browser’s privacy or security preferences, usually described as secure DNS.
  • You changed it on the wrong adapter, which happens on laptops with both Wi-Fi and ethernet configured.

What changing DNS actually fixes

Honest list, in order of how often it is the real answer:

  • Sites that fail to resolve while the connection works. The classic symptom: an IP address loads in the browser but named sites do not. Covered in detail in Wi-Fi connected but no internet.
  • Intermittent slow first loads. A provider DNS server under load adds hundreds of milliseconds before anything starts.
  • Privacy from your provider, if you use the encrypted options. Your provider can no longer log every domain you look up, though it still sees the addresses you connect to.
  • Access to sites your provider’s DNS blocks. Some providers implement blocking at the DNS layer, which a different resolver bypasses.

What it does not fix: buffering video, slow downloads, high ping in games, poor Wi-Fi coverage, or a speed test that comes in under your plan. Those are bandwidth and link quality, and DNS has no part in them.

Reverting

Set the same field back to Automatic or DHCP. On Android, set Private DNS back to Automatic. Nothing persists, and no files are changed.

Worth doing if you join a workplace or school network and internal resources stop resolving — those networks use their own DNS to find internal servers and printers, and a public resolver has never heard of them.

Frequently asked questions

Does changing DNS make my internet faster?
It can make pages start loading slightly sooner, because the lookup that precedes every new connection completes faster. It does not change your download speed, upload speed or the bandwidth your plan provides, so a speed test will show the same figures.
Which DNS server should I use?
Cloudflare at 1.1.1.1 and Google at 8.8.8.8 are both fast, free and well maintained. Cloudflare commits to not logging identifying query data; Google's is extremely reliable. Quad9 at 9.9.9.9 adds blocking of known malicious domains.
Is it safer to change DNS on each device or on the router?
The router applies it to everything including devices with no DNS settings of their own, like smart TVs and consoles. Per-device settings follow the device onto other networks, which is useful on a laptop and irrelevant on a desktop.
What is Private DNS on Android?
It is Android's implementation of DNS over TLS, which encrypts your lookups so your provider and anyone on the network cannot read which sites you are resolving. You enter a hostname such as one.one.one.one rather than an IP address.
Can changing DNS break anything?
On a corporate or school network, yes. Those networks often rely on internal DNS to resolve private hostnames and printers, and overriding it breaks access to internal resources. On a home network the risk is minimal, and reverting to automatic undoes it.

All Wi-Fi guides