Skip to content

How to Flush the DNS Cache on Windows, Mac, Phone and Chrome

Top view of a MacBook Pro keyboard on a speckled marble surface, showcasing a Russian Cyrillic layout.
Photo: Polina Tankilevitch / Pexels

To flush the DNS cache on Windows, open Command Prompt and run ipconfig /flushdns. On a Mac, current macOS versions commonly use two Terminal commands: sudo dscacheutil -flushcache followed by sudo killall -HUP mDNSResponder. iPhone and Android have no flush button, so a restart or airplane mode toggle is the practical option. Chrome has its own “Clear host cache” page.

What does flushing the DNS cache do?

Your device remembers recent website lookups so pages load faster. If a stored lookup is stale or a failed lookup was remembered, a site can keep failing even after the cause is fixed. Flushing clears those stored lookups, and the next visit asks for fresh ones. It does not delete passwords, bookmarks or browsing history.

Flush the cache when a site fails on one device but works on another, or when you see errors described in DNS errors explained. It will not fix a real outage, so check the service’s status first, as described in is it down or just me.

Which method fits my device?

Device Method Source
Windows ipconfig /flushdns in Command Prompt Microsoft Learn, ipconfig
Mac Two Terminal commands, or remove one site’s data in Safari Commands: widely used, not found in Apple pages; Safari path: Apple Support
iPhone and iPad Restart, airplane mode, Clear History and Website Data Apple Support (last item only)
Android Restart, airplane mode, check Private DNS Google Android Help (Private DNS path)
Chrome chrome://net-internals/#dns, Clear host cache Not confirmed in Google help

How do I flush the DNS cache on Windows?

Microsoft documents the command in its ipconfig reference: the /flushdns parameter flushes and resets the contents of the DNS client resolver cache.

  1. Click Start, type cmd, and open Command Prompt. (Terminal also works.)
  2. Type ipconfig /flushdns and press Enter.
  3. Wait for the message that the cache was successfully flushed.
  4. Reload the site, or restart the browser first.

Microsoft’s troubleshooting pages note that a failed lookup can be cached as “Name does not exist”, and that /flushdns clears it. Running /release or /renew does not flush the DNS cache.

How do I flush the DNS cache on a Mac?

We could not find a single Apple support page that lists the flush command, so treat these as the widely used commands rather than an Apple-published procedure. They are meant for current macOS versions and may change.

  1. Open Terminal from Applications, then Utilities.
  2. Run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  3. Enter your Mac password when asked. Nothing appears as you type.
  4. Reload the site.

Type only these commands, and only from a source you trust. Do not paste commands with extra parts you do not understand. If the problem is limited to Safari, Apple’s article If Safari doesn’t work as expected on Mac suggests removing the site’s stored data: choose Safari, Settings, Privacy, Manage Website Data, select the site, click Remove, then Done.

How do I clear DNS on iPhone, iPad and Android?

Neither Apple nor Google lists a “flush DNS” button for phones in the support pages we checked. These steps are the practical equivalents:

  1. Restart the phone. A restart clears temporary network data.
  2. Toggle airplane mode on for a few seconds, then off. This forces the phone to reconnect to the network.
  3. Test on mobile data instead of Wi-Fi. Apple’s page on Safari not loading websites on iPhone lists switching networks as the first step. See also works on mobile data but not Wi-Fi.
  4. iPhone: go to Settings, Apps, Safari, Clear History and Website Data (the path in Apple’s page above), then tap Clear History.
  5. Android: Google’s page on advanced network settings describes Private DNS under Settings, Network & internet, Private DNS. Google advises keeping it on its default; menu names can differ by manufacturer.

How do I clear the DNS cache in Chrome?

Chrome keeps its own host cache, separate from the operating system’s. Type chrome://net-internals/#dns in the address bar and select “Clear host cache”. We could not confirm this page in Google’s official help, and Google may change or remove internal pages, so if it does not appear in your version, restart Chrome instead. On Windows or Mac, flush the system cache as well.

Why is the site still not loading after a flush?

If the lookup was the problem, the page should load. If not, the cause lies elsewhere:

  • The site is down. Check the live Cloudflare status if the site shows a Cloudflare page, or the service’s own status page.
  • The router or provider’s DNS server is failing. Restart the router, test another network and read internet down at home.
  • A VPN or filter is interfering. Turn it off briefly to test.

Bottom line

Flushing DNS is a quick, harmless step for stale lookups: ipconfig /flushdns on Windows, two Terminal commands on a Mac, and a restart or airplane mode toggle on phones. If the site still fails, look at the router, the network or the service.

FAQ

Is it safe to flush the DNS cache?

Yes. It only clears stored lookups, and your device rebuilds them as you browse. The first visit to each site may be slightly slower.

Do I need administrator rights?

On a Mac the sudo command asks for an admin password. On Windows, run Command Prompt as administrator if you get a permission error.

How often should I flush the cache?

Only when a lookup problem appears. There is no benefit to doing it on a schedule.

Does flushing DNS speed up my internet?

No. It can fix stale or failed lookups, but it does not change your connection speed.