GuidesHow To'sHow To Clear DNS Cache?

How To Clear DNS Cache? [Detailed Guide]

Learn how to Clear DNS cache on Windows, macOS, Linux, Android, and iOS.

If you’re facing network connectivity issues, you need to try clearing the DNS cache. This can fix most of the network problems, and it is recommended that you do it at least once a month. The process is pretty simple and won’t take you long. 

Key Takeaways

  • A DNS cache stores the results of the DNS searches related to websites and servers that you search for.
  • Clearing the DNS cache is effective in fixing network connectivity errors and slow loading times on your computer or mobile phone.
  • The method of clearing the DNS cache is different for each platform, but you can do it using the Command Prompt on Windows. 

What Is DNS Cache?

Domain Name System (DNS) translates the domain names into IP addresses a machine can understand. It is an important part of the internet network that lets you visit websites and servers with easy domain names.

Meanwhile, a DNS cache is a temporary storage area that stores information related to recent DNS searches. So, the next time you search for the same website, your computer will look for the information within the DNS cache rather than making a new request to the DNS Server. Consequently, the time it takes for the website to load is reduced.

Why Should You Clear DNS Cache?

Sometimes, the data stored in the DNS cache can become corrupt or outdated, leading to problems when accessing a website. It can also cause errors on your computer or increase the loading time. Thus, it becomes necessary to clear the DNS cache to resume the proper operation of your device.

How To Clear DNS Cache?

The method for flushing the DNS cache varies with each operating system, like Windows, macOS, and Linux. Also, read our guide on how to power cycle your internet router, as that can help fix connectivity issues as well.


  1. Type cmd in the Search Bar and launch the Command Prompt.
    Command Prompt
    Command Prompt – Image Credits [Tech4Gamers]
  2. Write and Execute the command ipconfig/flushdns.
    DNS Code
    DNS Code – Image Credits [Tech4Gamers]
  3. Wait until the message, Successfully Flushed The DNS Resolver Cache, appears in the window.


  1. Click on the Spotlight icon on the top bar.
    How To Clear DNS Cache
    Spotlight – Image Credits [Tech4Gamers]
  2. Search for Terminal and Open it.
    How To Clear DNS Cache
    Terminal – Image Credits [Tech4Gamers]
  3. The command to clear the DNS cache in macOS varies with the version. Type the right command based on your macOS.
    OS Version DNS Flush Command Code
    Tiger lookupd – flushcache
    Ventura/Monterey/Catalina/Big Sur sudo dscacheutil – flushcache; sudo killall -HUP mDNSResponder
    Yosemite sudo discoveryutil mdnsflushcache
    Lion/Mojave/Mountain Lion/Mavericks/Sierra/El Capitan sudo killall -HUP mDNSResponder
  4. Hit the Enter key to launch the command.
  5. Type your Password and press Enter.
    How To Clear DNS Cache?
    macOS Code – Image Credits [Tech4Gamers]


  1. Click on the Menu symbol on the left sidebar.
    How To Clear DNS Cache
    Menu – Image Credits [Tech4Gamers]
  2. Press Terminal.
    Terminal – Image Credits [Tech4Gamers]
  3. First, type and enter resolvectl statistics. It will calculate the size of the DNS cache.
  4. Next, execute the command resolvectl flush-caches to clear the DNS cache.
  5. Ensure the process was successful by checking the size of the cache using the same code in Step 3.
    How To Clear DNS Cache
    Linux Code – Image Credits [Tech4Gamers]


  1. Tap the Settings icon on the Main Screen.
    Settings – Image Credits [Tech4Gamers]
  2. Move to Apps.
    Apps – Image Credits [Tech4Gamers]
  3. Find Chrome or any other web browser you use on your phone.
    Chrome – Image Credits [Tech4Gamers]
  4. Go to Storage.
    How To Clear DNS Cache
    Storage – Image Credits [Tech4Gamers]
  5. Press the Clear Cache button on the bottom panel.
    How To Clear DNS Cache
    Clear Cache – Image Credits [Tech4Gamers]
  6. Next, tap Manage Storage.
    Manage Storage
    Manage Storage – Image Credits [Tech4Gamers]
  7. Hit the button, Clear All Data.
    Clear All Data
    Clear All Data – Image Credits [Tech4Gamers]


  1. Head to the Settings.
    Settings – Image Credits [Tech4Gamers]
  2. Select General.
    How To Clear DNS Cache
    General – Image Credits [Tech4Gamers]
  3. Under General Settings, go to iPhone Storage.
    How To Clear DNS Cache
    iPhone Storage – Image Credits [Tech4Gamers]
  4. Tap on Safari or any other browser.
    How To Clear DNS Cache
    Safari – Image Credits [Tech4Gamers]
  5. Click on Website Data.
    Website Data
    Website Data – Image Credits [Tech4Gamers]
  6. Hit Remove All Website Data.
    Remove All Website Data
    Remove All Website Data – Image Credits [Tech4Gamers]

When Should You Clear DNS Cache?

Erasing the DNS cache periodically, like once a month, keeps errors and connectivity issues away from your computer and mobile phone. However, it becomes crucial to clear the cache in certain situations, for example, when;

  • You cannot access or load certain websites on your device.
  • It takes too long for the website to load properly.
  • You face network connectivity errors on your device.
  • You have updated the DNS settings or the Domain Name for your network.

What Are The Benefits Of Clearing DNS Cache?

The simple process of cleaning the DNS cache comes with a list of benefits for your device. For instance, it solves issues related to accessing websites on your computer/phone by making a new request to the DNS Server. Hence, you can easily launch websites.

In addition, it accelerates browsing speed by cleaning the buildup of unnecessary cache data in the DNS. Therefore, it only leaves the latest information so the device can quickly access it.

Furthermore, it comes in handy when you have recently changed the Domain Name or DNS Configurations on your computer. Flushing the DNS cache ensures the new settings are smoothly applied by removing old data so that your computer uses the most up-to-date information.

Importantly, refreshing the DNS cache is a widely-used troubleshooting step in resolving network connectivity or browsing errors. It makes sure there are no faults within the DNS data, which could be tempering with the network connectivity or smooth browsing on your device. 

Final Words

In conclusion, follow the steps mentioned in this guide on how to clear DNS cache on different Operating Systems so you can get back to hassle-free browsing. 

Frequently Asked Questions

What Does Clearing DNS Cache Do?

Clearing the DNS cache removes old and corrupt data in the DNS to allow quick and easy access to websites and network servers.

How Do I Clear DNS Cache On Linux?

Launch “Terminal” and execute the code “resolvectl flush-caches” to erase the DNS cache.

Can I Clear DNS Cache On My Mobile Phone?

Clear the browser’s data from your phone settings to wipe the DNS cache on your mobile.

Also Read:

Was our article helpful? 👨‍💻

Thank you! Please share your positive feedback. 🔋

How could we improve this post? Please Help us. 😔

Related articles

be quiet! Dark Power Pro 13 1300W Review

In-depth review of the Dark Power Pro 13 1300W featuring Specification, Box Contents, Teardown, Component Analysis, Design, and Performance.

Adata XPG Spectrix D41 Review [Benchmarks & Unboxing]

If you are in the market looking to get yourself some brilliant lighting enabled DDR4 then have a look on Adata XPG Spectrix D41 Review.

Acer’s AIO Hybrid RTX 4090 Shocks With Poor Cooling & Noisy Operation

Acer has introduced a new AIO-based hybrid GeForce RTX 4090 model, but it disappoints during initial testing against the competition.

Hideo Kojima’s Overdose Was Most Discussed Game At TGA 2023

Hideo Kojima's partnership with Xbox has resulted in Overdose, which was revealed at TGA 2023 and became the most covered game of the show.

PS5 Sales Were Up By 217% During Black Friday Compared To 2022

This Black Friday season has been incredible for the PS5, with sales growing by more than 200% for this console.

Similar Guides