How to Change DNS on Windows, Mac, Android & iPhone

Hands typing a web address on a laptop keyboard.

Every time you type a web address, your device does something you never see. Before a single pixel loads, it asks a server where that site lives.

By default, that server belongs to your internet provider. You didn’t pick it, and nobody asked. It also isn’t always the fastest or most private option available.

Here’s what you may not realize: you can also fire it! Most people can change DNS settings in a few minutes, with no downloads required. The steps differ a little on Windows, Mac, Android and iPhone, and we’ll get to each one. First, a quick look at what you’re actually changing.

What happens when you change your DNS server

DNS, short for Domain Name System, works like the internet’s phonebook. Websites have numeric IP addresses, but you type in names, so something has to translate. That something is a DNS server, also called a resolver.

Your ISP‘s resolver sees every lookup you make, which adds up to a fairly detailed record of where you go online. Switching to a provider with a strict no-logging policy, ideally with encrypted DNS turned on, makes that record much harder for your ISP to gather. 

Some services go further and refuse to connect you to known phishing and malware domains. You may notice faster page loads too, though on a decent connection the difference is usually minor.

What a new DNS server won’t do is hide your IP address or encrypt your traffic. Websites still see where you’re connecting from. For that, you’ll want to get a VPN.

DNS and web network icons representing domain name systems.

Google DNS vs. Cloudflare DNS: which one should you use?

There’s no shortage of companies that run free public DNS, but most people end up choosing between Cloudflare DNS and Google DNS. Two other services are also worth a look if you want something more specific.

ProviderIPv4 (primary / secondary)IPv6 (primary / secondary)
Cloudflare1.1.1.1 / 1.0.0.12606:4700:4700::1111 / 2606:4700:4700::1001
Google8.8.8.8 / 8.8.4.42001:4860:4860::8888 / 2001:4860:4860::8844
Quad99.9.9.9 / 149.112.112.1122620:fe::fe / 2620:fe::9
OpenDNS208.67.222.222 / 208.67.220.2202620:119:35::35 / 2620:119:53::53

Cloudflare DNS established its reputation on privacy and speed. The company commits to deleting query logs within 24 hours and lets outside auditors check that it actually does.

Google DNS is the steady veteran. It launched in 2009 and rarely goes down. Its privacy policy limits how long your IP address is stored (though some people would rather not route their browsing through the world’s biggest ad company at all).

Quad9 is a nonprofit that has a good reputation for refusing to resolve domains known for malware and phishing. 

OpenDNS, owned by Cisco, offers a FamilyShield version (208.67.222.123 and 208.67.220.123) that filters adult content, which is a great feature in a house with kids.

On speed, the gap between the top providers usually comes down to a few milliseconds, well below anything the average user would notice. The privacy policy is the better tiebreaker.

How to change DNS server on Windows 11 and 10

Windows hides this setting a few menus deep, but once you know the path, it takes about a minute.

Windows 11

  1. Open Settings and select Network & internet.
  2. Click Wi-Fi or Ethernet, depending on how you’re connected. On Wi-Fi, choose 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.
  5. Click Save.

Windows 11 also lets you turn on DNS over HTTPS from this screen, which encrypts your lookups. If your provider supports it, there’s no reason not to.

Windows 10

  1. Open Settings > Network & Internet > Change adapter options.
  2. Right-click your connection and choose Properties.
  3. Select Internet Protocol Version 4 (TCP/IPv4), then Properties.
  4. Choose Use the following DNS server addresses, enter both, and click OK.

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.

  1. Click the Apple menu and open System Settings.
  2. Select Network, then click Wi-Fi or Ethernet.
  3. Click Details next to your active connection.
  4. Choose DNS from the sidebar.
  5. Click the + button under DNS Servers and enter your preferred address. Click + again to add the alternate.
  6. Click OK.

Any gray addresses already listed came from your router. Once you add your own, those defaults will automatically disappear.

On macOS Monterey or earlier, the path is System Preferences > Network > Advanced > DNS.

Hands holding a smartphone while browsing on a city street.

How to change DNS on Android

Android handles DNS differently, and this is where most people get stuck. Instead of an IP address, the Private DNS setting asks for a hostname.

  1. Open Settings > Network & internet > Private DNS. On Samsung phones, look under Connections > More connection settings.
  2. Select Private DNS provider hostname.
  3. Enter the hostname: dns.google for Google DNS or one.one.one.one for Cloudflare DNS. Quad9 users can enter dns.quad9.net.
  4. Tap Save.

The upside is worth the quirk. Private DNS encrypts your lookups automatically, and it works on both Wi-Fi and mobile data, so your settings follow you everywhere.

How to change DNS on iPhone and iPad

  1. Open Settings > 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. Tap the red minus sign to remove the existing servers.
  5. Tap Add Server, enter your preferred address, then add the alternate.
  6. Tap Save.

Here’s the catch most guides leave out. Apple applies this setting only to the Wi-Fi network you just edited. If you join a different network, or switch to cellular, your phone will quietly go back to the default. 

To change DNS everywhere, you’ll need a provider’s app, such as Cloudflare’s 1.1.1.1, or a configuration profile from your DNS service.

Change DNS once on your router and cover everything

If your home is full of game consoles and smart TVs, changing DNS device by device gets old fast. Update it on your router instead, and every device on your network picks up the new settings.

  1. Type your router’s address into a browser, usually 192.168.1.1 or 192.168.0.1, and log in.
  2. Find the DNS settings, often under Internet, WAN or DHCP.
  3. Switch from automatic to manual and enter your new addresses.
  4. Save and restart the router if prompted.

One warning: some ISP-supplied routers lock this setting. If yours does, change DNS on each device instead.

How to check that your new DNS is working

Your device may keep using old lookups for a while, so clear its DNS cache first.

  • Windows: Open Command Prompt and run ipconfig /flushdns.
  • Mac: Open Terminal and run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder, then enter your password.
  • Phones: Toggling airplane mode on and off usually does the job.

Then load a few websites. If pages come up normally, you’re done. If nothing loads, recheck the addresses for typos, since one wrong digit breaks everything. You can also run a site through our Hostname to IP Address Lookup tool to confirm names are resolving properly.

DNS FAQs

Is it safe to change my DNS server?
Yes. Changing your DNS server is safe as long as you use a reputable provider like Google, Cloudflare or Quad9. You can switch back to your ISP’s default at any time.

Does changing DNS hide my IP address?
No. Changing DNS affects how your device looks up websites, but sites still see your real IP address. To hide your IP, you need a VPN or proxy.

Is Cloudflare DNS faster than Google DNS?
In independent tests, Cloudflare DNS often edges out Google DNS, but the difference is usually a few milliseconds. Most people won’t notice it in everyday browsing.

How do I switch back to my ISP’s DNS?
Return to the same settings screen and change DNS from manual back to automatic. On a router, select the option to get DNS from your ISP.