How to change your DNS server on Windows, Mac, iPhone, Android and your router

If websites fail with "server not found", DNS_PROBE_FINISHED_NXDOMAIN or very slow first loads, while the sites themselves are fine, your internet provider's DNS servers are a likely culprit. Switching to a free public DNS service takes about two minutes, can be undone at any time, and fixes a surprising number of "it's only me" problems. Here's how to do it on every common device.

Diagram: your device asks a DNS server where a site is; the provider's DNS fails, while a public DNS such as 1.1.1.1, 8.8.8.8 or 9.9.9.9 answers and the site loads
Tap the image to enlarge

What DNS does, in one paragraph

Computers find each other by numeric IP addresses, not names. DNS (the Domain Name System) is the internet's address book: when you type example.com, your device asks a DNS server for that site's address, then connects to it. By default, that DNS server belongs to your internet provider. If it's slow, broken or out of date, websites fail to load even though nothing is wrong with them.

When changing your DNS helps

  • You see DNS_PROBE_FINISHED_NXDOMAIN, ERR_NAME_NOT_RESOLVED or "server not found" for a site that CheckIfSiteDown shows as Up.
  • Many sites fail at once while your connection is otherwise working (for example, apps that use their own servers still work).
  • Pages take a long time to start loading, then load normally.
  • A site recently moved to a new server and you're still being sent to the old one.

It won't help if the website is genuinely down, or if your whole connection is offline. Run a check first if you're not sure.

Choose a public DNS service

All of these are free, fast and widely used. Each has a main and a backup address; enter both.

ServiceIPv4 addressesGood for
Cloudflare1.1.1.1 and 1.0.0.1Speed and privacy
Google Public DNS8.8.8.8 and 8.8.4.4Reliability
Quad99.9.9.9 and 149.112.112.112Blocks known malicious sites
Cloudflare for Families1.1.1.3 and 1.0.0.3Blocks malware and adult content, handy for a family router

If your settings also ask for IPv6 DNS, use Cloudflare's 2606:4700:4700::1111 and 2606:4700:4700::1001, Google's 2001:4860:4860::8888 and 2001:4860:4860::8844, or Quad9's 2620:fe::fe and 2620:fe::9.

Windows 11

  1. Open Settings > Network & internet.
  2. Choose Wi-Fi > Hardware properties (or Ethernet if you're plugged in by cable).
  3. Next to DNS server assignment, click Edit and change Automatic (DHCP) to Manual.
  4. Turn on IPv4 and enter your chosen addresses as Preferred DNS and Alternate DNS.
  5. If you see a DNS over HTTPS option, turning it on encrypts your lookups. Click Save.

Windows 10

  1. Open Control Panel > Network and Sharing Center > Change adapter settings.
  2. Right-click your connection (Wi-Fi or Ethernet) and choose Properties.
  3. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
  4. Choose Use the following DNS server addresses, enter both addresses, and click OK.

Mac

  1. Open the Apple menu > System Settings > Network.
  2. Click Wi-Fi (or Ethernet), then Details… next to the network you're connected to.
  3. Choose DNS in the sidebar. Under DNS Servers, click + and add each address. Remove any old entries with –.
  4. Click OK.

On older macOS versions it's System Preferences > Network > Advanced > DNS.

iPhone and iPad

  1. Open Settings > Wi-Fi and tap the ⓘ next to your network.
  2. Scroll down and tap Configure DNS > Manual.
  3. Delete the existing servers, tap Add Server to enter each new address, then tap Save.

This applies to that one Wi-Fi network only, not to mobile data. Repeat it for other networks you use often.

Android

Android 9 and later use Private DNS, which works on Wi-Fi and mobile data and encrypts your lookups. It asks for a hostname rather than numbers:

  1. Open Settings > Network & internet > Private DNS. On Samsung phones it's Settings > Connections > More connection settings > Private DNS. Other brands may use slightly different names; search Settings for "Private DNS".
  2. Choose Private DNS provider hostname and enter one of: one.one.one.one (Cloudflare), dns.google (Google) or dns.quad9.net (Quad9).
  3. Tap Save.

Your router (every device at once)

  1. Type your router's address into a browser. It's usually 192.168.0.1 or 192.168.1.1, and is printed on a sticker on the router with the admin password.
  2. Look for DNS under a section called Internet, WAN or DHCP / LAN.
  3. Enter the two addresses, save, and restart the router if asked.

Every device on your network then uses the new DNS automatically. Some routers supplied by internet providers lock this setting; if so, change it on each device instead.

After you switch: flush and test

  1. Clear your device's old DNS answers: on Windows run ipconfig /flushdns; on a Mac run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder in Terminal; on phones, toggle airplane mode on and off.
  2. Restart your browser. In Chrome you can also visit chrome://net-internals/#dns and choose Clear host cache.
  3. Reload the site that wasn't working. If you chose Cloudflare, one.one.one.one/help confirms it's in use.

How to undo it

Go back to the same setting and choose Automatic (Windows, iPhone), remove the addresses (Mac), or turn Private DNS off or to Automatic (Android). Two common reasons to switch back: hotel or airport Wi-Fi whose login page won't appear with custom DNS, and work networks whose internal sites rely on the company's own DNS. On a work-managed device, check with IT before changing anything.

When changing DNS isn't enough

A new DNS server fixes lookups, but it doesn't change where you appear to be, and it doesn't hide which sites you visit from your internet provider or the network you're on. So it won't get you past:

  • "Not available in your region" messages, which are based on your IP address, not your DNS.
  • Network filters on school, work or public Wi-Fi that inspect traffic directly (see websites blocked on Wi-Fi).
  • Routing faults between your provider and a particular website.

For those, a reputable VPN is the usual answer: it gives you an address in another location and an encrypted route around the block. Our guide Website up but blocked for you? covers how it works and when it won't help.

Disclosure: some links on this page are affiliate links. If you buy through them, CheckIfSiteDown may earn a commission at no extra cost to you. It never affects our status results, and we only recommend services with a strong reputation. Learn more.

The short version

Pick Cloudflare (1.1.1.1), Google (8.8.8.8) or Quad9 (9.9.9.9), enter it in your device's or router's network settings, flush your DNS cache and reload. If a site still won't open, check whether it's down, and if it's up for everyone else, work through our browser error guide.