{"id":2056,"date":"2026-02-05T13:23:31","date_gmt":"2026-02-05T13:23:31","guid":{"rendered":"http:\/\/www.valentinedaysgifts.com\/index.php\/2026\/02\/05\/how-to-flush-dns-cache-on-mac-all-macos-versions\/"},"modified":"2026-02-05T13:23:31","modified_gmt":"2026-02-05T13:23:31","slug":"how-to-flush-dns-cache-on-mac-all-macos-versions","status":"publish","type":"post","link":"http:\/\/www.valentinedaysgifts.com\/index.php\/2026\/02\/05\/how-to-flush-dns-cache-on-mac-all-macos-versions\/","title":{"rendered":"How to Flush DNS Cache on Mac (All macOS Versions)"},"content":{"rendered":"
Sometimes the internet feels instant. You type a website name, hit Enter, and the page appears almost magically. Other times, the same site refuses to load, shows errors, or opens the wrong version of a page. When that happens on a Mac, the problem is often not your internet connection, but something much quieter working in the background: the DNS cache.<\/p>\n
Understanding how to flush the DNS cache on macOS can save you from hours of frustration. It\u2019s one of those small fixes that feels invisible, yet it often solves problems immediately. Let\u2019s walk through what DNS cache is, why it matters, and how to clear it safely on any modern or older Mac.<\/p>\n
Before jumping into commands and steps, it helps to understand what DNS cache actually is<\/a> and why your Mac keeps it around.<\/p>\n The Domain Name System, or DNS, works like the Internet\u2019s phonebook. Humans prefer website names like Your Mac stores these translations locally in something called a DNS cache. Every time you visit a website, your system saves its IP address so it doesn\u2019t need to ask a DNS server again the next time you visit. This makes browsing faster and smoother.<\/p>\n The problem is that this cache doesn\u2019t always age well.<\/p>\n Most of the time, DNS cache quietly does its job. But when it goes wrong, it can break your browsing experience in confusing ways.<\/p>\n One common reason to flush DNS is troubleshooting. If a website won\u2019t load, loads very slowly, or shows errors like \u201cDNS server not responding,\u201d your Mac may be using outdated or incorrect DNS information. Websites change servers and IP addresses, but your local cache may still point to the old location.<\/p>\n Security is another big reason. DNS cache can be targeted by attacks known as DNS cache poisoning. In simple terms, malicious software can alter cached records and redirect you to fake or harmful websites that look legitimate. Clearing the cache helps remove these corrupted entries.<\/p>\n Flushing DNS is also helpful after:<\/p>\n In short, flushing DNS forces your Mac to forget old information and ask fresh questions again.<\/p>\n Clearing DNS cache on a Mac may sound technical, but the process is straightforward. You don\u2019t need special tools or advanced knowledge, just a built-in app and one command.<\/p>\n To do this, you\u2019ll need:<\/p>\n Terminal is macOS\u2019s command-line tool. It allows you to give the operating system direct instructions using text commands.<\/p>\n The fastest way to open Terminal is using Spotlight:<\/p>\n You can also open it manually by going to Applications > Utilities > Terminal<\/strong>.<\/p>\n Once open, you\u2019ll see a simple window with a blinking cursor. This is where you\u2019ll enter the DNS flush command.<\/p>\n Modern versions of macOS all use the same command, which makes things easy. This includes:<\/p>\n After opening Terminal, copy and paste the following command and press Return<\/strong>:<\/p>\n You\u2019ll then be asked to enter your Mac\u2019s password<\/a>. As you type, nothing will appear on the screen, not even dots or asterisks. This is normal and done for security reasons. Type the password and press Return<\/strong>. There will be no confirmation message. If the command runs and you see a new prompt line, the DNS cache has been successfully cleared.<\/p>\n If you\u2019re using an older version of macOS or OS X, the command may be different. The steps are the same, only the command changes.<\/p>\n Here are the correct commands by version:<\/p>\n After running the command, enter your password if prompted and wait for the terminal prompt to return.<\/p>\n Related:<\/strong> How to Clear the DNS Cache on an iPhone or iPad<\/a><\/p>\n Once the DNS cache is cleared, your Mac immediately starts rebuilding it. The next time you visit a website, your system asks a DNS server for fresh information instead of relying on old records.<\/p>\n You may notice:<\/p>\n There\u2019s no downside to flushing DNS occasionally. Your Mac will simply re-learn what it needs as you browse.<\/p>\n For most users, flushing DNS cache isn\u2019t something you need to do often. However, it\u2019s a great habit if you:<\/p>\n Think of it like clearing a cluttered desk. You\u2019re not deleting anything important, you\u2019re just making room for accurate, up-to-date information.<\/p>\n Flushing DNS cache on a Mac is one of those quiet fixes that feels small but delivers big results. It doesn\u2019t require special apps, restarts, or advanced skills. A single command can restore broken connections, resolve loading issues, and protect you from outdated or unsafe DNS records.<\/p>\n The next time a website refuses to cooperate and everything else seems fine, remember this trick. Sometimes, the internet just needs your Mac to forget and start fresh.<\/p>\n The post How to Flush DNS Cache on Mac (All macOS Versions)<\/a> appeared first on iGeeksBlog<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" Sometimes websites won\u2019t load even when your internet is fine. This guide explains what DNS cache is and how to safely clear it on both newer and older Macs using simple Terminal commands.example.com<\/code>, while computers communicate using IP addresses made up of numbers. DNS translates the name you type into the numeric address your computer needs to reach the website.<\/p>\nWhy Flushing DNS Cache Is Important<\/h2>\n
\n
How to Clear DNS Cache on macOS<\/h2>\n
\n
\n
<\/li>\n<\/ol>\nFlush DNS Cache on macOS Sequoia, Sonoma, Ventura, Monterey, and Newer<\/h2>\n
\n
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder <\/code><\/pre>\n
<\/p>\nFlush DNS Cache on Older macOS Versions<\/h2>\n
\n
: sudo killall -HUP mDNSResponder<\/code><\/li>\n: sudo discoveryutil udnsflushcaches<\/code><\/li>\n: sudo dscacheutil -flushcache<\/code><\/li>\n: sudo lookupd -flushcache<\/code><\/li>\nlookupd -flushcache<\/code><\/li>\n<\/ul>\nWhat Happens After You Flush DNS Cache?<\/h2>\n
\n
Should You Flush DNS Cache Regularly on Mac?<\/h2>\n
\n
Final Thoughts<\/h2>\n
\nThe post <\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-2056","post","type-post","status-publish","format-standard","hentry","category-mac"],"_links":{"self":[{"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/posts\/2056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/comments?post=2056"}],"version-history":[{"count":0,"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/posts\/2056\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/media?parent=2056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/categories?post=2056"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.valentinedaysgifts.com\/index.php\/wp-json\/wp\/v2\/tags?post=2056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}