How to Clear the DNS Cache

The "flush DNS" is a command used to clear and remove cached information stored in the Domain Name System (DNS) of a computer. The DNS is responsible for translating domain names (e.g., into IP addresses, allowing connections to the correct servers on the internet.

When you visit a website, your computer stores information about the IP address of that site in a DNS cache. This is done to speed up future accesses to the same site, avoiding the need to repeatedly query the DNS server to translate the domain name.

However, sometimes this cached information can become outdated or incorrect, leading to internet connection issues. In these cases, the "flush DNS" command is used to clear the DNS cache, removing all temporarily stored entries. This action forces the system to retrieve updated IP addresses when accessing a site, helping to resolve domain name resolution issues or unstable connections.


  1. Open Command Prompt: Press the Windows + R keys, type "cmd," and press Enter to open the Command Prompt.
  2. Execute the DNS cache cleanup command: Type ipconfig /flushdns and press Enter.
  3. A message confirming that the DNS cache has been successfully cleared should appear.


  1. Open Terminal: Go to Applications > Utilities > Terminal or use the Spotlight search to find the Terminal.
  2. Execute the DNS cache cleanup command: Type sudo killall -HUP mDNSResponder and press Enter. You might be prompted to enter your administrator password.
  3. MacOS won't provide a confirmation message, but the DNS cache will be cleared.


  1. Open Terminal: Depending on the Linux distribution, it can be accessed through the applications menu or by pressing Ctrl + Alt + T.
  2. Execute the DNS cache cleanup command: Depending on the distribution, it can vary, but commonly you can use sudo systemctl restart network-managerousudo /etc/init.d/nscd restart.
  3. If you are using a specific Linux distribution, it's advisable to check the documentation or search for specific commands to clear the DNS cache for that distribution.

Dispositivos Móveis (Android e iOS):

Clearing the DNS cache on mobile devices like smartphones and tablets is generally not a direct operation accessible to the user. However, there are actions you can take that might help clear or refresh the DNS cache temporarily. Here are some options that might be helpful:

For iOS devices (iPhone/iPad):

  1. Restart the device: Powering off and then on your iOS device can help clear the DNS cache temporarily.
  2. Toggle Airplane Mode: Turning Airplane Mode on and off can reset the network connections, which sometimes clears the DNS cache temporarily.
  3. Forget Wi-Fi network: Accessing the Wi-Fi settings and selecting "Forget" on the current network, then reconnecting, can help refresh the DNS cache.

For Android devices:

  1. Restart the device: Similar to iOS devices, powering off and then on your Android device can help clear the DNS cache temporarily.
  2. Toggle Airplane Mode or reset network settings: Accessing Settings > System > Reset Network Settings or Network Settings Reset, depending on the Android model, can help clear the DNS cache.
  3. Clear browser cache: If the issue is related to domain name resolution in the browser, clearing the browser cache can help resolve specific DNS resolution issues within the browser.

Please note that these methods can temporarily clear the DNS cache on mobile devices but do not provide direct control over the DNS cache as with a computer. If the issue persists or if you require a more thorough clearing of the DNS cache, you might need to restart the Wi-Fi router or contact your internet service provider for further assistance.

Related articles
Have questions?
Ask in the live chat, we are ready to help around the clock