{"id":16148,"date":"2026-10-07T16:00:55","date_gmt":"2026-10-07T15:00:55","guid":{"rendered":"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/"},"modified":"2026-10-07T16:00:55","modified_gmt":"2026-10-07T15:00:55","slug":"how-to-flush-dns-cache-on-windows-mac-and-linux","status":"publish","type":"post","link":"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/","title":{"rendered":"How to Flush DNS Cache on Windows Mac and Linux"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_87 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#How_to_Flush_DNS_Cache_on_Windows_Mac_and_Linux\" >How to Flush DNS Cache on Windows, Mac and Linux<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#What_Is_DNS_Cache_and_Why_Does_It_Matter\" >What Is DNS Cache and Why Does It Matter?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#How_to_Flush_DNS_Cache_on_Windows\" >How to Flush DNS Cache on Windows<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Step-by-Step_Instructions_for_Windows\" >Step-by-Step Instructions for Windows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Additional_DNS_Commands_for_Windows\" >Additional DNS Commands for Windows<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#How_to_Flush_DNS_Cache_on_Mac\" >How to Flush DNS Cache on Mac<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Flushing_DNS_Cache_on_macOS_Monterey_Ventura_and_Sonoma\" >Flushing DNS Cache on macOS Monterey, Ventura, and Sonoma<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Flushing_DNS_Cache_on_Older_macOS_Versions\" >Flushing DNS Cache on Older macOS Versions<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#How_to_Flush_DNS_Cache_on_Linux\" >How to Flush DNS Cache on Linux<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Flushing_DNS_Cache_Using_systemd-resolved\" >Flushing DNS Cache Using systemd-resolved<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Flushing_DNS_Cache_Using_nscd\" >Flushing DNS Cache Using nscd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Flushing_DNS_Cache_Using_dnsmasq\" >Flushing DNS Cache Using dnsmasq<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#When_Should_You_Flush_DNS_Cache\" >When Should You Flush DNS Cache?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/da-manager.com\/blog\/how-to-flush-dns-cache-on-windows-mac-and-linux\/#Final_Thoughts\" >Final Thoughts<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<p><html><br \/>\n<head><br \/>\n<title>How to Flush DNS Cache on Windows, Mac and Linux<\/title><br \/>\n<\/head><br \/>\n<body><\/p>\n<h1><span class=\"ez-toc-section\" id=\"How_to_Flush_DNS_Cache_on_Windows_Mac_and_Linux\"><\/span>How to Flush DNS Cache on Windows, Mac and Linux<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>If you have ever experienced issues loading websites, encountered outdated IP addresses, or noticed that DNS changes are not taking effect, the solution is often straightforward: flush DNS cache. This simple yet powerful action clears the stored DNS records on your device, forcing it to fetch fresh information from the DNS server. In this guide, we will walk you through exactly how to flush DNS cache on Windows, Mac, and Linux, so you can resolve connectivity issues quickly and efficiently.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Is_DNS_Cache_and_Why_Does_It_Matter\"><\/span>What Is DNS Cache and Why Does It Matter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>DNS, or Domain Name System, acts as the internet&#8217;s phonebook. When you visit a website, your device sends a query to a DNS server to translate the human-readable domain name (such as example.com) into a machine-readable IP address. To speed up this process, your operating system stores these translations locally in a DNS cache.<\/p>\n<p>Over time, this cache can become outdated or corrupted. If a website changes its IP address, your device may still be pointing to the old address stored in the cache. This can result in slow loading times, error messages, or an inability to access certain websites altogether. Flushing the DNS cache removes all stored records, prompting your system to retrieve accurate, up-to-date information.<\/p>\n<p>Knowing when and how to flush DNS cache is a valuable skill for anyone who manages websites, troubleshoots network issues, or simply wants to keep their browsing experience running smoothly. For more helpful technical guides, visit the <a href=\"https:\/\/da-manager.com\/blog\">DA Manager blog<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Flush_DNS_Cache_on_Windows\"><\/span>How to Flush DNS Cache on Windows<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Windows makes it relatively simple to flush the DNS cache using the Command Prompt. The process is quick and only takes a few seconds.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step-by-Step_Instructions_for_Windows\"><\/span>Step-by-Step Instructions for Windows<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Follow these steps to flush DNS cache on any version of Windows, including Windows 10 and Windows 11:<\/p>\n<ol>\n<li>Press the <strong>Windows key<\/strong> on your keyboard or click the Start menu.<\/li>\n<li>Type <strong>cmd<\/strong> into the search bar.<\/li>\n<li>Right-click on <strong>Command Prompt<\/strong> and select <strong>Run as administrator<\/strong>. This ensures you have the necessary permissions to clear the cache.<\/li>\n<li>In the Command Prompt window, type the following command and press <strong>Enter<\/strong>:<\/li>\n<\/ol>\n<p><code>ipconfig \/flushdns<\/code><\/p>\n<p>You should see a confirmation message that reads: <em>Successfully flushed the DNS Resolver Cache.<\/em> This means the process has completed successfully.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Additional_DNS_Commands_for_Windows\"><\/span>Additional DNS Commands for Windows<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>While you have the Command Prompt open, there are a couple of other useful commands worth knowing. To display the current DNS cache, type <code>ipconfig \/displaydns<\/code>. To register your DNS records, use <code>ipconfig \/registerdns<\/code>. These commands can be helpful when diagnosing more complex network issues.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Flush_DNS_Cache_on_Mac\"><\/span>How to Flush DNS Cache on Mac<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Flushing the DNS cache on a Mac varies slightly depending on the version of macOS you are running. Apple has changed the command required in different versions of its operating system, so it is important to use the correct one for your system.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Flushing_DNS_Cache_on_macOS_Monterey_Ventura_and_Sonoma\"><\/span>Flushing DNS Cache on macOS Monterey, Ventura, and Sonoma<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For the most recent versions of macOS, the process involves using the Terminal application:<\/p>\n<ol>\n<li>Open <strong>Finder<\/strong> and navigate to <strong>Applications &gt; Utilities &gt; Terminal<\/strong>, or use Spotlight Search (Command + Space) and type <strong>Terminal<\/strong>.<\/li>\n<li>Enter the following command and press <strong>Return<\/strong>:<\/li>\n<\/ol>\n<p><code>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder<\/code><\/p>\n<li>You will be prompted to enter your administrator password. Type it in and press <strong>Return<\/strong>.<\/li>\n<p>Unlike Windows, macOS does not display a confirmation message after the command runs successfully. If no error appears, the cache has been flushed.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Flushing_DNS_Cache_on_Older_macOS_Versions\"><\/span>Flushing DNS Cache on Older macOS Versions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you are running an older version of macOS, the command differs slightly:<\/p>\n<ul>\n<li><strong>macOS High Sierra, Sierra, and El Capitan:<\/strong> <code>sudo killall -HUP mDNSResponder<\/code><\/li>\n<li><strong>macOS Yosemite:<\/strong> <code>sudo discoveryutil udnsflushcaches<\/code><\/li>\n<li><strong>macOS Mavericks and earlier:<\/strong> <code>sudo dscacheutil -flushcache<\/code><\/li>\n<\/ul>\n<p>Always ensure you are using the correct command for your specific macOS version to avoid errors.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Flush_DNS_Cache_on_Linux\"><\/span>How to Flush DNS Cache on Linux<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Linux is a more varied operating system, with different distributions handling DNS caching in different ways. Not all Linux systems cache DNS by default, but many modern distributions use either <strong>systemd-resolved<\/strong> or <strong>nscd<\/strong> to manage DNS.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Flushing_DNS_Cache_Using_systemd-resolved\"><\/span>Flushing DNS Cache Using systemd-resolved<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your Linux distribution uses systemd-resolved (common in Ubuntu 18.04 and later, as well as many other modern distributions), use the following command:<\/p>\n<p><code>sudo systemd-resolve --flush-caches<\/code><\/p>\n<p>To confirm the cache has been cleared, you can check the statistics with:<\/p>\n<p><code>sudo systemd-resolve --statistics<\/code><\/p>\n<p>Look for the <em>Current Cache Size<\/em> value \u2014 it should be zero after flushing.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Flushing_DNS_Cache_Using_nscd\"><\/span>Flushing DNS Cache Using nscd<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your system uses the Name Service Cache Daemon (nscd), you can flush the DNS cache by restarting the service:<\/p>\n<p><code>sudo service nscd restart<\/code><\/p>\n<p>Or, on systems using systemctl:<\/p>\n<p><code>sudo systemctl restart nscd<\/code><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Flushing_DNS_Cache_Using_dnsmasq\"><\/span>Flushing DNS Cache Using dnsmasq<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Some Linux distributions use dnsmasq as a DNS caching service. To flush the cache, restart dnsmasq with the following command:<\/p>\n<p><code>sudo systemctl restart dnsmasq<\/code><\/p>\n<p>If you are unsure which DNS caching service your Linux distribution uses, check your system documentation or run <code>systemctl list-units --type=service<\/code> to see active services.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"When_Should_You_Flush_DNS_Cache\"><\/span>When Should You Flush DNS Cache?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Knowing how to flush DNS cache is only half the battle \u2014 understanding when to do it is equally important. Here are some common scenarios where flushing the DNS cache is recommended:<\/p>\n<ul>\n<li><strong>Website not loading correctly:<\/strong> If a site you know is live is not displaying, a stale DNS record may be the culprit.<\/li>\n<li><strong>DNS changes not propagating:<\/strong> After updating DNS records for a domain, flushing the cache can help your device pick up the new settings faster.<\/li>\n<li><strong>Security concerns:<\/strong> DNS cache poisoning is a type of cyberattack where malicious actors corrupt your DNS cache to redirect traffic. Flushing the cache can help mitigate this risk.<\/li>\n<li><strong>After changing DNS servers:<\/strong> If you have recently switched to a different DNS provider, flushing the cache ensures your device uses the new server immediately.<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Learning how to flush DNS cache on Windows, Mac, and Linux is a fundamental skill that can save you a great deal of time and frustration when dealing with network issues. Whether you are a web developer, IT professional, or everyday user, clearing your DNS cache is one of the first troubleshooting steps you should take when experiencing connectivity problems.<\/p>\n<p>The process is quick, safe, and requires no specialist tools \u2014 just a command line and a few seconds of your time. Bookmark this guide so you always have the correct commands to hand, and remember to check your operating system version before running any commands, particularly on macOS and Linux where the syntax can vary.<\/p>\n<p>With a fresh DNS cache, your device will be able to resolve domain names accurately and efficiently, helping you get back online without unnecessary delays.<\/p>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Flush DNS Cache on Windows, Mac and Linux<\/p>\n<p>How to Flush DNS Cache on Windows, Mac and Linux<\/p>\n<p>If you have ever experienced issues loading websites, encountered outdated IP addresses, or noticed that DNS changes are not taking effect, the solution is often straightforward: flush DNS cache. <\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mbp_gutenberg_autopost":false,"footnotes":""},"categories":[147],"tags":[],"class_list":["post-16148","post","type-post","status-publish","format-standard","category-general"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts\/16148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/comments?post=16148"}],"version-history":[{"count":0,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/posts\/16148\/revisions"}],"wp:attachment":[{"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/media?parent=16148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/categories?post=16148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/da-manager.com\/blog\/wp-json\/wp\/v2\/tags?post=16148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}