{"id":2932,"date":"2023-11-28T08:20:00","date_gmt":"2023-11-28T06:20:00","guid":{"rendered":"https:\/\/www.mcloud9.com\/blog\/?p=2932"},"modified":"2024-02-16T00:59:18","modified_gmt":"2024-02-15T22:59:18","slug":"how-to-flush-dns-cache","status":"publish","type":"post","link":"https:\/\/www.mcloud9.com\/blog\/how-to-flush-dns-cache\/","title":{"rendered":"How To Flush DNS Cache: An Easy Step-By-Step Guide"},"content":{"rendered":"\n<p>Understanding how to flush DNS cache is an important skill for anyone navigating the web. In this step-by-step tutorial, we&#8217;ll demystify DNS cache, explain why flushing it is essential, and show you how to do it on various operating systems. So, let&#8217;s jump in and ensure your online journey remains smooth!<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#what-is-dns-cache\">What Is DNS Cache?<\/a><\/li><li><a href=\"#why-flush-dns-cache\">Why Flush DNS Cache?<\/a><\/li><li><a href=\"#how-to-flush-your-dns-cache\">How to Flush Your DNS Cache<\/a><ul><li><a href=\"#flushing-dns-cache-on-windows\">Flushing DNS cache on Windows<\/a><\/li><li><a href=\"#flushing-dns-cache-on-mac-os-x\">Flushing DNS cache on Mac OS X<\/a><\/li><li><a href=\"#flushing-dns-cache-on-linux\">Flushing DNS cache on Linux<\/a><\/li><\/ul><\/li><li><a href=\"#faq-for-flushing-dns-cache\">FAQ for Flushing DNS Cache<\/a><ul><\/ul><\/li><li><a href=\"#in-conclusion\">In Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-dns-cache\">What Is DNS Cache?<\/h2>\n\n\n\n<p>Before we delve into the <em>how<\/em>, let&#8217;s briefly touch on the <em>what<\/em>. DNS cache, or Domain Name System cache, is like a digital phone book for your internet browsing. It stores previously accessed <a href=\"\/blog\/what-is-a-website-domain-name\">domain names<\/a> and their corresponding <a href=\"\/blog\/what-is-an-ip-address-internet-protocols\">IP addresses<\/a> locally on your device. This cache expedites your online experience by avoiding the need to query DNS servers every time you visit a website. In essence, it&#8217;s your browser&#8217;s way of saving time and making your online journey more efficient. <\/p>\n\n\n\n<p>Did you know that there were 1.88 billion websites online as of 2021, according to <a href=\"https:\/\/www.statista.com\/chart\/19058\/number-of-websites-online\/\" target=\"_blank\" rel=\"noreferrer noopener\">Statista<\/a>? With so many websites to navigate, a well-maintained DNS cache becomes crucial in ensuring a smooth online experience.<\/p>\n\n\n\n<p>Learn more about DNS in our article: <a href=\"\/blog\/what-is-dns-domain-name-system\">What Is DNS? Domain Name System &#8211; A Comprehensive Guide<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-flush-dns-cache\">Why Flush DNS Cache?<\/h2>\n\n\n\n<p>Now, you might be wondering, &#8220;<em>Why would I need to clear my DNS cache?<\/em>&#8221; Well, here are some compelling reasons:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Resolution Issues<\/strong>: Sometimes, DNS cache can become outdated or corrupted, leading to resolution problems. Flushing the cache ensures you get the most up-to-date information.<br><\/li>\n\n\n\n<li><strong>Privacy and Security<\/strong>: Clearing your DNS cache can help safeguard your privacy by erasing traces of the <a href=\"\/blog\/what-is-a-website\">websites<\/a> you&#8217;ve visited. It also prevents potential security threats like DNS cache poisoning and spoofing.<br><\/li>\n\n\n\n<li><strong>Website Updates<\/strong>: When website owners make changes, like migrating to a new domain, your cached DNS information can become outdated. Clearing the cache ensures you access the updated site.<br><\/li>\n\n\n\n<li><strong>Network Troubleshooting<\/strong>: If you&#8217;re experiencing connectivity issues or can&#8217;t access a particular site, clearing the DNS cache is often a quick fix.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-flush-your-dns-cache\">How to Flush Your DNS Cache<\/h2>\n\n\n\n<p>Now, let&#8217;s get into the nitty-gritty of clearing DNS cache on different operating systems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"flushing-dns-cache-on-windows\">Flushing DNS cache on Windows<\/h3>\n\n\n\n<p><strong>Step 1: Open Command Prompt<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To open the Command Prompt, click on the Windows Start menu and type &#8220;cmd&#8221; into the search bar.<\/li>\n\n\n\n<li>Right-click on &#8220;Command Prompt&#8221; and select &#8220;Run as administrator.&#8221;<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 2: Run the Following Command<\/strong><\/p>\n\n\n\n<p>In the Command Prompt console, type the following command and hit Enter:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ipconfig \/flushdns<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Voila!<\/strong><\/p>\n\n\n\n<p>You&#8217;ll receive a message confirming the successful flush of your DNS resolver cache. Your DNS cache on Windows is now squeaky clean!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"flushing-dns-cache-on-mac-os-x\">Flushing DNS cache on Mac OS X<\/h3>\n\n\n\n<p><strong>Step 1: Access Terminal<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open your &#8220;Applications&#8221; folder.<br>Go to &#8220;Utilities&#8221; and launch &#8220;Terminal.&#8221;<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 2: Run the Following Command<\/strong><\/p>\n\n\n\n<p>In the Terminal, input the following command for your version of Mac and press Enter:<\/p>\n\n\n\n<p>Catalina (10.15), Big Sur (11), Monterey (12) and newer<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder<\/code><\/pre>\n\n\n\n<p>El Capitan (10.11), Sierra (10.12), High Sierra (10.13), Mojave (10.14)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo killall -HUP mDNSResponder<\/code><\/pre>\n\n\n\n<p>Yosemite (10.10)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo discoveryutil udnsflushcaches<\/code><\/pre>\n\n\n\n<p>Lion (10.7), Mountain Lion (10.8), Mavericks (10.9)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo killall -HUP mDNSResponder<\/code><\/pre>\n\n\n\n<p>Snow Leopard (10.6)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dscacheutil -flushcache<\/code><\/pre>\n\n\n\n<p>Leopard (10.5)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo lookupd -flushcache<\/code><\/pre>\n\n\n\n<p>Tiger (10.4)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lookupd -flushcache<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Ta-da!<\/strong><\/p>\n\n\n\n<p>You&#8217;ll be prompted to enter your administrative login password, but once that&#8217;s done, your DNS cache on Mac OS X is refreshed and ready to go!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"flushing-dns-cache-on-linux\">Flushing DNS cache on Linux<\/h3>\n\n\n\n<p>Linux operating systems may vary, but we&#8217;ll provide a general approach.<\/p>\n\n\n\n<p><strong>Step 1: Open Terminal<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access your terminal or command line interface. The method can differ depending on your Linux distribution.<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 2: Reset the DNS Cache<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Execute the appropriate command for your Linux distribution. For example, on Ubuntu, you can use:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemd-resolve --flush-caches<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Problem Solved!<\/strong><\/p>\n\n\n\n<p>Your DNS cache on Linux is now cleared, and you&#8217;re back in action! You can confirm the cache has been cleared using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemd-resolve --statistic<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq-for-flushing-dns-cache\">FAQ for Flushing DNS Cache<\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1695146971046\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is DNS cache?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>DNS cache is a temporary database that stores information about <a href=\"\/blog\/what-is-a-website-domain-name\">domains<\/a> and their corresponding <a href=\"\/blog\/what-is-an-ip-address-internet-protocols\">IP addresses<\/a>. It helps to improve the speed and efficiency of internet browsing by reducing the time required to resolve domain names.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1695146975530\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How often should I flush the DNS cache?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>There is no set frequency for flushing the DNS cache. It is generally recommended to delete DNS cache when you encounter connectivity issues or if a website&#8217;s IP address has changed. You can also choose to delete the DNS cache periodically as part of regular maintenance.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1695146982111\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Will removing the DNS cache delete any of my browser&#8217;s data or settings?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>No, removing the DNS cache will not delete any of your <a href=\"\/blog\/how-to-clear-cache-and-cookies-for-web-browsers\">browser&#8217;s data<\/a> or settings. It only clears the locally stored <a href=\"\/blog\/what-is-dns-domain-name-system\">DNS records<\/a>, which will be automatically refreshed when you access websites or online services.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1695146990441\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is DNS flushing, and how is it different from flushing browser cache?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>DNS flushing refers to clearing the locally stored DNS cache on your computer or device. It helps in retrieving fresh DNS information and resolving DNS-related issues. On the other hand, <a href=\"\/blog\/how-to-clear-cache-and-cookies-for-web-browsers\">deleting browser cache<\/a> involves clearing the temporary files, cookies, and other data stored by a web browser. It can help in resolving website display issues or retrieving updated content.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"in-conclusion\">In Conclusion<\/h2>\n\n\n\n<p>And there you have it! You&#8217;ve successfully learned how to flush DNS cache on different operating systems, ensuring a smoother, safer, and more efficient online experience. Remember, keeping your DNS cache up to date is just one step in optimising your online presence.<\/p>\n\n\n\n<p>At MCloud9, we understand the importance of a seamlessly running website. As a reliable <a href=\"\/web-hosting\" target=\"_blank\" rel=\"noreferrer noopener\">web hosting<\/a> and <a href=\"\/register-a-domain\" target=\"_blank\" rel=\"noreferrer noopener\">domain registration<\/a> company, we&#8217;re here to support your online journey. Whether you&#8217;re starting a new online business or looking to enhance your existing web presence, MCloud9 offers a <a href=\"\/\" target=\"_blank\" rel=\"noreferrer noopener\">range of services<\/a> to meet your needs. Our knowledgeable customer support team is just a click away to assist you with any questions or concerns.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understanding how to flush DNS cache is an important skill for anyone navigating the web. In this step-by-step tutorial, we&#8217;ll demystify DNS cache, explain why flushing it is essential, and show you how to do it on various operating systems. So, let&#8217;s jump in and ensure your online journey remains smooth! What Is DNS Cache? [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":2981,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"tdm_status":"","tdm_grid_status":"","footnotes":""},"categories":[18,113,35,36],"tags":[110],"class_list":{"0":"post-2932","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tips-tricks","8":"category-tutorials","9":"category-web-design","10":"category-web-dev","11":"tag-performance"},"_links":{"self":[{"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/posts\/2932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/comments?post=2932"}],"version-history":[{"count":13,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/posts\/2932\/revisions"}],"predecessor-version":[{"id":3473,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/posts\/2932\/revisions\/3473"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/media\/2981"}],"wp:attachment":[{"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/media?parent=2932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/categories?post=2932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mcloud9.com\/blog\/wp-json\/wp\/v2\/tags?post=2932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}