How to clear your local DNS cache

Joshua Rosato
Published: 23 January 2024Last updated: 13 August 2024
Share:

In this guide we’ll walk you through clearing the local DNS cache on various operating systems.

This can help in situations where new DNS records look to have propagated online but you’re still hitting the old servers.

Clear Windows local DNS cache

  1. Click the Start button and type cmd to search for the Command Prompt
  2. Open the Command Prompt
  3. Run the command ipconfig /flushdns to clear the cache

Once flushed, you should receive a message similar to the below:

Windows IP Configuration

Successfully flushed the DNS Resolver Cache.

Clear MacOS local cache

  1. Open the Terminal app
  2. Run the command sudo dscacheutil --flushcache
  3. Run the command sudo killall -HUP mDNSResponder

Clear Linux local cache

  1. Open a terminal shell
  2. Run the command sudo systemd-resolve --flush-caches to clear the cache
  3. Run the command sudo systemd-resolve --statistics to verify the cache has been cleared

Clear iPhone local cache

  1. Toggle Airplane mode on and then off again.
  2. Reboot your phone.

Clear Android local cache

  1. Open Chrome and navigate to the below URL:
  2. chrome://net-internals/#dns
  3. Click the Clear host cache button.
  4. Toggle Airplane mode on and then off again.
  5. Reboot your phone.