Skip to content

How to Clear and Flush DNS Cache on your Devices

Learn how to clear the DNS (Domain Name Server) Cache on any of the devices. You can clear the cache for Windows, Mac, Linux, Android, and iPhone or iPad devices.

The internet needs the DNS for resolving the domain name into server IP address which shall load the correct website in our web browser. If the IP address of the domain is changed, DNS will not be able connect the IP address resulting in errors. Hence, clearing the cached DNS files will help in fetching the new addresses. We can clear and flush DNS cache on Windows, Mac, Linux, Android and iPhone or iPad devices.

Clear or Flush the DNS Cache on your devices

DNS or Domain Name Server is a protocol that helps translate the domain names to IP addresses to which it belongs. Without a DNS server, we have to remember the IP addresses for each website which is very hectic and impossible given that millions of IP addresses exist in the internet world today.

But what is the need to clear or flush the DNS cache? An extensive website getting millions and billions of visitor have multiple web server, and each server has a unique IP address assigned to it. These servers, known as Load Balancers, are used for balancing the server load and act as disaster management for fallback.

If a web server is down, it’s routed to a nearby server, hence changing its IP address stored in the cache, which results in network connection and site loading issues. Hence, when we clear the DNS cache, the new IP address is fetched and assigned to the domain address, which is again stored as a cache for quick response.

Each system has a different way of storing and flushing the DNS cache. Hence we have covered most devices operating systems that can help you fix the incorrect DNS issue.

info icon
Note: A few web browser does have their own DNS host and cache, which are independent of system DNS. If you have a network-related problem with the browser, say, Chrome, then you should flush Chrome’s DNS cache.

Clear DNS Cache on Windows

The command prompt is one of the easiest ways to clear the DNS cache from Windows. You only need to execute two simple code words to flush the stored DNS cache. Here are the steps for your Windows PC:

  1. Click on the Start menu from the taskbar and search for Command Prompt in the search bar.
  2. Select the Run as administrator option.
    Command Prompt app Run as Administrator from Start menu on WindowsIt will launch the command prompt window with administrator permissions.
  3. Type the command ipconfig /flushdns and press Enter key.
    ipconfig flushdns command on Windows Command Prompt
  4. You should see a message saying- Windows IP Configuration Successfully flushed the DNS Resolver Cache.

That’s it. The DNS cache of the Windows PC has been cleared. If you revisit a domain name, the fresh IP address will be fetched and assigned to the domain name.

Clear DNS Cache on Mac

Like the Windows PC, you can use the Terminal app on macOS to clear the cache stored in the network settings. Here are the steps to clear the DNS cache on macOS:

  1. Invoke Spotlight Search using Cmd+Spacebar keys on your macOS.
  2. Search and open the Terminal app.
    Spotlight Search to open Terminal App
  3. Type the following command and press Enter key:
    sudo killall -HUP mDNSResponder && sudo dscacheutil -flushcache

    Clear DNS Cache from macOS using Terminal app command

It might prompt you to enter your user password for executing the sudo user command. That’s it; DNS records are flushed and cleared from the macOS system.

Clear DNS Cache on Android

Flushing the DNS cache on Android smartphones is tricky. It doesn’t have a dedicated DNS cache-clearing option. However, it does have a DNS Settings page which helps in configuring the DNS addresses (like, Google DNS, CloudFlare DNS, etc.) if required.

The only way to clear the DNS cache is by using the Reset Network Settings option from the Internet settings page. Here are the steps to follow:

  1. Open the Settings app on your Android Phone.
  2. Select Network & Internet settings and open the Internet menu.
    Internet menu under Network and Internet settings on Android Phone
  3. Tap on the Reset Internet Settings command button from the top-right corner.
    Reset Network and Internet Settings on Android Phone

It will immediately reset the connected network settings and clear the DNS cache stored in the Android phone. You will have to reconnect with your Wi-Fi network after resetting.

info icon
Note: Reset Network Settings in Android phones will not clear the saved Wi-Fi password.

To yield better results, you can also consider combining Airplane Mode and Reset Network Settings for a complete DNS cache wipeout.

Clear DNS Cache on iPhone

Like the Android phone, even the iPhone or iPad does not have the DNS cache clearing option. We have to rely on the network connection option to reset. One of the easiest ways is using the Airplane mode, which will disconnect and reconnect the network connection while performing the DNS flush.

Follow these steps to clear the DNS cache using the Airplane mode on your iPhone or iPad:

  1. Slide down to open the Control Center on your device.
  2. Tap on the Airplane mode button to Turn On.
    Airplane Mode button under Control Center on iPhone
  3. Wait for a few seconds and then Turn Off the Airplane mode.

It will disable and then enable the active network connection and clear the stored DNS cache.

Alternatively, there is an advanced but more complex way to clear the DNS cache using the Reset Network settings option under the Settings app > General > Transfer or Reset iPhone > Reset.

Reset Network Settings option in iPhone Settings menu

It will flush the DNS cache along with all your settings on your iPhone or iPad device.

Bottom Line

DNS is the backbone of networks and connections for the internet. It helps identify and resolve the domain name with a correct IP address to load the site in split seconds.

The cached DNS settings improve the speed but occasionally result in errors due to outdated records. Clearing or flushing the DNS cache can help update outdated records and resolve network-related issues.

While most systems do have an automated way to clear the DNS cache, it works in a fixed time interval like an hour, a week, etc., which the webmaster sets within the domain registrar console. Hence, manually clearing the DNS cache will help to fix the immediate site loading problems.

Lastly, if you've any thoughts or feedback on How to Clear and Flush DNS Cache on your Devices, then feel free to drop in below comment box. You can also report the outdated information.

Please share the article if you find it helpful:

Disclosure: This page may contain affiliate links, which means we may receive compensation for your purchases using our links; of course at no extra cost to you (indeed, you may get special discounts).

Kushal Azza

Kushal is a Bachelor of Engineering, a Certified Google IT Support Professional, and a Digital-Tech Geek. He has over a decade of experience solving tech problems, troubleshooting, and creating digital solutions. Follow him on Twitter and LinkedIn.

Share us your thoughts and feedback

Your email address will not be published. Required fields are marked *