How to Flush DNS Cache (Windows, Mac, Linux, Mobile)

Run a Speed Test

Your OS caches DNS lookups to speed up repeated visits. When a site's IP changes, moves hosts, or you switch DNS providers, a stale entry can send you to a dead address or the wrong server. Flushing the cache forces fresh lookups. Here is the one-line command for every platform.

When You Should Flush DNS

  • Website loads "Server not found" but works on your phone's cellular data
  • You just changed DNS servers (to 1.1.1.1, 8.8.8.8, etc.) and want to force the switch
  • A site you own just moved hosts and the new IP isn't reaching you
  • You suspect DNS cache poisoning or a compromised router's DNS
  • After fixing a DNS_PROBE_FINISHED_NO_INTERNET or ERR_NAME_NOT_RESOLVED error

Windows 10 and 11

Open Command Prompt or PowerShell (no admin rights needed) and run:

ipconfig /flushdns

You should see "Successfully flushed the DNS Resolver Cache." To also reset the TCP/IP stack (helpful for stubborn connection errors):

ipconfig /release
ipconfig /renew
netsh winsock reset
netsh int ip reset

The last two require admin and a reboot.

macOS

Open Terminal and run:

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

You'll be prompted for your user password. Both commands are needed on modern macOS — the first clears the UDS cache, the second restarts the mDNS service that handles Bonjour and unicast DNS.

Linux (systemd-resolved)

Most modern distros use systemd-resolved. Check with resolvectl status, then flush:

sudo resolvectl flush-caches

For older distros using dnsmasq:

sudo systemctl restart dnsmasq

If nscd is installed: sudo systemctl restart nscd.

iPhone and iPad

iOS does not expose a DNS flush command. Any of these force a cache clear:

  • Toggle Airplane Mode on, wait 5 seconds, toggle off
  • Settings → General → Transfer or Reset iPhone → Reset → Reset Network Settings (nuclear option — clears saved Wi-Fi too)
  • Restart the device

Android

Like iOS, Android doesn't expose a direct flush. Try:

  • Toggle Airplane Mode
  • Settings → System → Reset options → Reset Wi-Fi, mobile & Bluetooth
  • In Chrome on Android, browser DNS cache can be cleared by closing all tabs

Chrome Browser (All Platforms)

Chrome keeps its own internal DNS cache on top of the OS cache. Visit this URL and click "Clear host cache":

chrome://net-internals/#dns

Do the same in Edge: edge://net-internals/#dns. Firefox uses the OS cache directly, so an OS flush is enough.

Quick Reference

PlatformCommand / Action
Windowsipconfig /flushdns
macOSsudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
Linux (systemd)sudo resolvectl flush-caches
iPhone / iPadToggle Airplane Mode or reset network settings
AndroidToggle Airplane Mode
Chromechrome://net-internals/#dns → Clear host cache
RouterReboot the router (30-second power cycle)

If Flushing Doesn't Help

The stale DNS might be upstream — at your router, ISP, or the public DNS provider. Reboot the router first. If the issue persists, try switching to a different DNS server (1.1.1.1 or 8.8.8.8). See DNS choices for a comparison of the major public DNS providers.

Frequently Asked Questions

Does flushing DNS make the internet faster?

Not measurably. The cache exists to speed things up, so clearing it briefly makes repeat lookups slower until the cache refills. Flush only to fix wrong entries, not for speed.

How often should I flush my DNS cache?

Only when you have a reason — a site is unreachable, you changed DNS servers, or you are troubleshooting a specific error. There is no maintenance value in flushing on a schedule.

Does restarting my router flush DNS?

It flushes the router's DNS cache but not your computer's local cache. You need both if the router is the source of the stale entry.

Related Guides

More From This Section