How to Flush DNS and Switch to 1.1.1.1, 8.8.8.8 or 9.9.9.9
Updated November 16, 2026 · 5 min read
DNS is the internet's address book. When you type a website's name, your device asks a DNS server for the matching numeric address, then remembers the answer for a while so it doesn't have to ask again. Usually that's helpful. When the remembered answer is out of date, or the DNS server you're using is slow or broken, websites fail to load even though they're perfectly fine.
Quick answer
To flush your DNS cache, run ipconfig /flushdns on Windows, or sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder on macOS, or toggle Airplane Mode on a phone. To switch to a public DNS server, open your network settings and set the DNS addresses manually: Cloudflare is 1.1.1.1 and 1.0.0.1, Google is 8.8.8.8 and 8.8.4.4, and Quad9 is 9.9.9.9 and 149.112.112.112.
When this helps
Flushing DNS and changing DNS server are worth trying when:
- You see
DNS_PROBE_FINISHED_NXDOMAIN,ERR_NAME_NOT_RESOLVEDor "Server IP address could not be found". - A website moved to a new host recently and loads for others but not for you.
- Every site feels slow to start loading, but fast once it does.
- A site is up on the Is It Down Everywhere? checker but your device can't find it.
It won't help if the site itself is down. Always check whether it's down for everyone first.
Which public DNS server should I pick?
All three below are free, fast and widely used. Pick whichever you like, since you can always switch back.
| Provider | IPv4 addresses | IPv6 addresses | Worth knowing |
|---|---|---|---|
| Cloudflare | 1.1.1.1, 1.0.0.1 |
2606:4700:4700::1111, 2606:4700:4700::1001 |
Focus on speed and privacy |
| Google Public DNS | 8.8.8.8, 8.8.4.4 |
2001:4860:4860::8888, 2001:4860:4860::8844 |
Very widely used and reliable |
| Quad9 | 9.9.9.9, 149.112.112.112 |
2620:fe::fe, 2620:fe::9 |
Blocks domains known to be malicious |
Always enter both the primary and secondary address, so you have a fallback.
Flush your DNS cache
Windows 10 and 11
- Press the Start button and type cmd.
- Right-click Command Prompt and choose Run as administrator.
- Type
ipconfig /flushdnsand press Enter. - You should see "Successfully flushed the DNS Resolver Cache."
macOS
- Open Terminal (Applications → Utilities).
- Run:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder - Enter your Mac password when asked. Nothing appears while you type, which is normal. There's no confirmation message either.
Linux
On most modern distributions that use systemd-resolved, run:
resolvectl flush-caches
On older systems the command is sudo systemd-resolve --flush-caches. If your system uses a different resolver, restarting it or rebooting does the same job.
iPhone and iPad
There's no button for it, but either of these clears the cache:
- Turn Airplane Mode on, wait ten seconds, then turn it off, or
- Restart the device.
Android
- Turn Airplane mode on and off, or restart the phone.
- If you use Chrome, go to
chrome://net-internals/#dnsand tap Clear host cache.
Chrome, Edge and other Chromium browsers
Browsers keep their own small DNS cache too. Visit chrome://net-internals/#dns (or edge://net-internals/#dns in Edge) and click Clear host cache. Then visit #sockets on the same page and click Flush socket pools.
Change your DNS server
Windows 11
- Open Settings → Network & internet.
- Click Wi-Fi (or Ethernet), then your connection's Hardware properties.
- Next to DNS server assignment, click Edit and choose Manual.
- Switch on IPv4, enter your chosen preferred and alternate DNS addresses and click Save.
- Optionally do the same for IPv6.
On Windows 10, the same setting lives under Control Panel → Network and Sharing Center → Change adapter settings. Right-click your connection, choose Properties, then Internet Protocol Version 4 (TCP/IPv4).
macOS
- Open System Settings → Network.
- Click Wi-Fi (or Ethernet), then Details next to your network.
- Choose DNS, click + under DNS Servers and add your two addresses.
- Remove any old entries you don't want and click OK.
iPhone and iPad
- Open Settings → Wi-Fi and tap the ⓘ next to your network.
- Scroll to Configure DNS and choose Manual.
- Delete the existing servers, tap Add Server and enter your two addresses.
- Tap Save.
This applies to that Wi-Fi network only. Mobile data uses your carrier's DNS.
Android
Android uses "Private DNS", which takes a hostname rather than numbers and encrypts your lookups:
- Open Settings → Network & internet → Private DNS (sometimes under Connections → More connection settings).
- Choose Private DNS provider hostname.
- Enter
one.one.one.onefor Cloudflare,dns.googlefor Google ordns.quad9.netfor Quad9. - Tap Save.
This works on both Wi-Fi and mobile data.
Your home router
Changing DNS on the router changes it for every device on your network at once. Log in to your router's admin page (the address is usually printed on a sticker on the router), look for DNS in the internet or WAN settings, and enter your two addresses. Menus vary a lot between models, so check your router's manual if you can't find it.
Testing that it worked
- Close and reopen your browser.
- Visit the site that wasn't loading.
- If it still fails, try it on mobile data to rule out your Wi-Fi network. Our guide on why sites work on mobile data but not Wi-Fi can help.
Switching back
If something feels off afterwards, for example a work network that relies on its own DNS for internal sites, simply go back to the same setting and choose Automatic (or DHCP). Your device will use whatever the network provides again.
Still not working?
DNS is only one link in the chain. If the error has changed from a DNS_PROBE message to something like ERR_CONNECTION_REFUSED or a timeout, see how to fix "This site can't be reached". If a site loads on every network except one, it may be blocked there. Our guide on blocked websites and VPNs explains what to do. More questions are answered in the FAQ.