{"id":1482,"date":"2021-05-10T13:36:52","date_gmt":"2021-05-10T10:36:52","guid":{"rendered":"https:\/\/www.scalahosting.com\/kb\/?p=1482"},"modified":"2025-11-27T11:34:04","modified_gmt":"2025-11-27T09:34:04","slug":"how-to-clear-the-dns-cache-on-your-computer","status":"publish","type":"post","link":"https:\/\/www.scalahosting.com\/kb\/how-to-clear-the-dns-cache-on-your-computer\/","title":{"rendered":"How to Clear DNS Cache: Windows Mac Linux Guide"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Clearing your DNS cache after making some<\/span><b> DNS changes<\/b><span style=\"font-weight: 400;\"> helps you get the latest version of your website. This article guides you on everything you\u2019d need to know on DNS cache and how to flush it.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, let\u2019s take a look.<\/span><\/p>\n<h2><b>What\u2019s DNS ?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">DNS stands for <\/span><b>domain name system<\/b><span style=\"font-weight: 400;\">, and it\u2019s like the internet\u2019s <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;phone book&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:636,&quot;5&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;6&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;7&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;8&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;9&quot;:0,&quot;12&quot;:0}\">phone book<\/span>. The system allows you to connect to websites with human-readable domain names instead of their <\/span><b>IP addresses<\/b><span style=\"font-weight: 400;\">\u2014the unique ID of the website\u2019s server.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Every computer on the internet has a <\/span><b>unique numerical ID<\/b><span style=\"font-weight: 400;\"> that helps others computers to identify it. Memorizing these strings of numbers for every website we want to visit could be a big deal.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Domain names solve this problem by using<\/span><b> easy-to-remember words<\/b><span style=\"font-weight: 400;\"> to match this IP address. Instead of using <\/span><b>216.58.223.228 <\/b><span style=\"font-weight: 400;\">to connect to <\/span><b>Google<\/b><span style=\"font-weight: 400;\">, you could easily use its domain name <\/span><a href=\"http:\/\/www.google.com\"><b>www.google.com<\/b><\/a><b>.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">DNS helps you<\/span><b> connect to computers<\/b><span style=\"font-weight: 400;\"> using domain names instead of IP addresses.<\/span><\/p>\n<h2><b>Understanding DNS Cache<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">If DNS is the internet\u2019s <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;phone book&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:636,&quot;5&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;6&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;7&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;8&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;9&quot;:0,&quot;12&quot;:0}\">phone book<\/span>, then <\/span><b>DNS cache is the internet\u2019s <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;phone book&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:636,&quot;5&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;6&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;7&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;8&quot;:{&quot;1&quot;:[{&quot;1&quot;:2,&quot;2&quot;:0,&quot;5&quot;:{&quot;1&quot;:2,&quot;2&quot;:0}},{&quot;1&quot;:0,&quot;2&quot;:0,&quot;3&quot;:3},{&quot;1&quot;:1,&quot;2&quot;:0,&quot;4&quot;:1}]},&quot;9&quot;:0,&quot;12&quot;:0}\">phone book<\/span> <\/b><span style=\"font-weight: 400;\">saved in your local computer.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When you <\/span><b>visit a website<\/b><span style=\"font-weight: 400;\"> on your browser, it first looks for the DNS information in your computer DNS cache. If the browser finds the information, it uses the DNS cache to<\/span><b> connect the website<\/b><span style=\"font-weight: 400;\">; otherwise, it looks up DNS servers across the internets.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When the browser finds the direction on a <\/span><a href=\"https:\/\/www.scalahosting.com\/kb\/hosting\/dns\/\"><b>DNS server<\/b><\/a><span style=\"font-weight: 400;\">, your computer caches the information and saves it in the local DNS cache for subsequent visits.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Local DNS cache helps a browser quickly find a website anytime you visit by taking the <\/span><b>shortest route to finding the DNS information.<\/b><\/p>\n<h2><b>Why Flushing DNS Cache Matters ?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Purging your local DNS caches forces the browser to<\/span><b> initiate a new DNS server lookup<\/b><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<p><b>Some of what makes this essential includes:<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">DNS changes are often slow to update on the local cache &#8211;<\/span><b> flushing the cache<\/b><span style=\"font-weight: 400;\"> ensures you don\u2019t end up seeing the old website or getting an error message.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">It helps quickly display an <\/span><b>updated version of a website<\/b><span style=\"font-weight: 400;\"> after moving to a new host or domain name changes.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Hackers could poison the DNS<\/span><i><span style=\"font-weight: 400;\"> (DNS spoofing)<\/span><\/i><span style=\"font-weight: 400;\"> to <\/span><b>redirect you to a malicious website<\/b><span style=\"font-weight: 400;\">, so regularly purging the cache helps you stay safe.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">DNS cache could be a target for <\/span><b>data collectors.<\/b><\/li>\n<\/ul>\n<h2><b>How to Flush DNS Cache on Local Computers ?<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Let\u2019s quickly examine how to<\/span><b> purge DNS cache<\/b><span style=\"font-weight: 400;\"> on various computers.<\/span><\/p>\n<h3><b>Windows Operating System<\/b><\/h3>\n<p><b>Follow these steps to clear DNS cache on Windows computers:<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Hold the Window key and R to open the Run interface.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Type cmd on the search bar and click OK to open the DOS command window.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Enter this command on the command prompt <\/span><span style=\"font-weight: 400;\">ipconfig \/flushdns<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Press the Enter key to execute the command.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">You\u2019d receive a confirmation message if the <\/span><b>cache purge <\/b><span style=\"font-weight: 400;\">were successful.<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1485\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image1-6.png\" alt=\"How to Clear DNS Cache: Windows Mac Linux Guide, Windows Operating System\" width=\"622\" height=\"285\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image1-6.png 622w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image1-6-300x137.png 300w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/p>\n<p><i><span style=\"font-weight: 400;\">Note: don\u2019t type the command together. Put a space between ipconfig and the trailing slash (\/), or you\u2019ll receive an error.<\/span><\/i><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1484\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image3-6.png\" alt=\"How to Clear DNS Cache: Windows Mac Linux Guide, Windows Operating System 2\" width=\"629\" height=\"506\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image3-6.png 629w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image3-6-300x241.png 300w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/p>\n<h3><b>macOS<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Open the terminal window to<\/span><b> clear the local DNS cache<\/b><span style=\"font-weight: 400;\"> on your macOS computers. Click on Applications, open the <\/span><i><span style=\"font-weight: 400;\">\u2018Utilities\u2019 <\/span><\/i><span style=\"font-weight: 400;\">folders and then launch the<\/span><b> Terminal app.<\/b><\/p>\n<p><b>Use these commands to flush the cache:<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">For OS X Yosemite v10.10.4 or later,<\/span> <span style=\"font-weight: 400;\">copy and run this command on the terminal<\/span> <span style=\"font-weight: 400;\">sudo killall -HUP mDNSResponder<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">For OS X Yosemite v10.10 through v10.10.3: <\/span><span style=\"font-weight: 400;\">sudo discoveryutil mdnsflushcache<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">For OS X Mavericks, Mountain Lion, and Lion:<\/span> <span style=\"font-weight: 400;\">sudo killall -HUP mDNSResponder<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">For macOS X Snow Leopard: <\/span><span style=\"font-weight: 400;\">sudo dscacheutil -flushcache<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Enter your admin password in the space provided and hit the <\/span><b>Return key<\/b><span style=\"font-weight: 400;\"> to execute the command. Your admin password is the same password you use to log in to your computer.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Unlike Windows, macOS doesn\u2019t send notifications when the process executes. However, you could get <\/span><b>audio confirmation<\/b><span style=\"font-weight: 400;\"> by adding, <\/span><i><span style=\"font-weight: 400;\">say [input the message you want to receive as audio confirmation]<\/span><\/i><span style=\"font-weight: 400;\"> to the command.<\/span><\/p>\n<p><b>Here\u2019s an example:<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">sudo killall -HUP mDNSResponder; say dns cleared successfully<\/span><span style=\"font-weight: 400;\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">The command <\/span><b>clears the macOS local DNS cache<\/b><span style=\"font-weight: 400;\"> and gives you a <\/span><i><span style=\"font-weight: 400;\">\u2018DNS cleared successfully\u2019 <\/span><\/i><span style=\"font-weight: 400;\">voice confirmation message.<\/span><\/p>\n<h3><b>Google Chrome Browser<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Google Chrome browser <\/span><b>maintains its DNS cache,<\/b><span style=\"font-weight: 400;\"> which is different from the cache your local computer operating system collects. If Chrome is your primary browser, you should also clear its DNS cache <\/span><b>after purging your computer.<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Type this address <\/span><i><span style=\"font-weight: 400;\">chrome:\/\/net-internals\/#dns<\/span><\/i><span style=\"font-weight: 400;\"> in the browser address bar to get started.\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-1483\" src=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image2-6.png\" alt=\"How to Clear DNS Cache: Windows Mac Linux Guide, Google Chrome Browser\" width=\"585\" height=\"195\" srcset=\"https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image2-6.png 585w, https:\/\/www.scalahosting.com\/kb\/wp-content\/uploads\/2021\/05\/image2-6-300x100.png 300w\" sizes=\"(max-width: 361px) 660px, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 910px, 1140px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Click on the \u2018<\/span><i><span style=\"font-weight: 400;\">Clear host cache button <\/span><\/i><span style=\"font-weight: 400;\">to <\/span><b>purge the browser DNS cache.<\/b><\/p>\n<h2><b>Wrapping It Up<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Clearing the local DNS cache on your computer helps you see an <\/span><b>updated version of your website or protect it from vulnerabilities.<\/b><span style=\"font-weight: 400;\"> This guide makes it intuitive. Follow the steps to get started immediately.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Don\u2019t hesitate to contact <\/span><a href=\"https:\/\/www.scalahosting.com\/contact-us.html\"><b>Scalahosting\u2019s customer service<\/b><\/a><span style=\"font-weight: 400;\"> if you need support.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Clearing your DNS cache after making some DNS changes helps you get the latest version of your website. This article guides you on everything you\u2019d need to know on DNS cache and how to flush it. So, let\u2019s take a look. What\u2019s DNS ? DNS stands for domain name system, and it\u2019s like the internet\u2019s [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_seopress_robots_primary_cat":"none","_seopress_titles_title":"How to Clear DNS Cache: Windows Mac Linux Guide | ScalaHosting KB","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":""},"categories":[22],"tags":[],"class_list":["post-1482","post","type-post","status-publish","format-standard","hentry","category-dns"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/1482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/comments?post=1482"}],"version-history":[{"count":8,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/1482\/revisions"}],"predecessor-version":[{"id":5829,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/posts\/1482\/revisions\/5829"}],"wp:attachment":[{"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/media?parent=1482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/categories?post=1482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scalahosting.com\/kb\/wp-json\/wp\/v2\/tags?post=1482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}