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]

Also Read: How To Add More USB Ports To A PC?


  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]

Also Read: Windows Could Not Prepare Computer To Boot Installation Error


  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.

Also Read: How To Reset RGB LED Controller?

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

Assassin’s Creed Mirage: Xbox Listing Hints At Real Gambling

Despite the previous controversy, the updated Assassin's Creed Mirage store page on Xbox shows that the game will have real gambling.

Yakuza Dev Announces RGG Summit Showcase For June 15

The Yakuza development studio, Ryu Ga Gotoku, announced a new RGG summit for June 15, and fans are expecting plenty of exciting information.

GUNNIR Intel Arc A380 Selling For $120 In China After Price Drop

Gunnir Intel Arc A380 is now available in China with a huge discount making it a perfect low-end gaming card.

Redfall Has Already Dropped Out Of Top 50 Most Played Xbox Games

Redfall's player base is steadily declining and it is no longer among the top 50 most-played games on Xbox.

PlayStation Visual Arts Studio Is Now Facing LayOffs

According to a new LinkedIn post, PlayStation Visual Arts Studio has been hit with multiple lay-offs as part of a new restructuring.

Similar Guides

Ali Rashid Khan
Ali Rashid Khan
Ali Rashid Khan is an avid gamer, hardware enthusiast, photographer, and devoted litterateur with a period of experience spanning more than 14 years. Sporting a specialization with regards to the latest tech in flagship phones, gaming laptops, and top-of-the-line PCs, Ali is known for consistently presenting the most detailed objective perspective on all types of gaming products, ranging from the Best Motherboards, CPU Coolers, RAM kits, GPUs, and PSUs amongst numerous other peripherals. When he’s not busy writing, you’ll find Ali meddling with mechanical keyboards, indulging in vehicular racing, or professionally competing worldwide with fellow mind-sport athletes in Scrabble at an international level. Currently speaking, Ali has completed his A-Level GCEs with plans to go into Business Studies, or who knows, perhaps a full-time dedicated technological journalist.


Please enter your comment!
Please enter your name here