{"id":5884,"date":"2018-04-24T14:41:44","date_gmt":"2018-04-24T19:41:44","guid":{"rendered":"https:\/\/www.tecklyfe.com\/?p=5884"},"modified":"2018-04-24T14:41:44","modified_gmt":"2018-04-24T19:41:44","slug":"how-to-flush-dns-cache-in-macos","status":"publish","type":"post","link":"https:\/\/www.tecklyfe.com\/how-to-flush-dns-cache-in-macos\/","title":{"rendered":"How To Flush DNS Cache in MacOS"},"content":{"rendered":"
<\/p>\n
If your Mac is on a network where DNS changes are made frequently or occasionally, there might be a time where you’ll need to perform a DNS flush so that you can resolve a web address to the correct IP address. You might run into an issue where a computer on the network is setup with a dynamic IP address from a DHCP server and the IP address has changed since you last accessed it. In Windows, you would run the simple command of For each version below, you’ll need to be logged in with an Administrator account, and you’ll run the commands from Terminal.<\/p>\n macOS Sierra (10.12) and macOS High Sierra (10.13): El Capitan Mac OS X (10.11) and macOS Sierra (10.12) and High Sierra (10.13): Yosemite Mac OS X (10.10.4 and Higher): Yosemite Mac OS X (10.10 – 10.10.3): Lion Mac OS X (10.7), Mountain Lion Mac OS X (10.8) and Mavericks Mac OS X (10.9): Leopard Mac OS X (10.5) and Snow Leopard Mac OS X (10.6): If your Mac is on a network where DNS changes are made frequently or occasionally, there might be a time where you’ll need to perform a DNS flush so that you can resolve a web address to the correct IP address. You might run into an issue where a computer on the network is setup with a dynamic IP address from a DHCP server and the IP address has changed since you last accessed it. In Windows, you would run the simple command of ipconfig \/flushdns from a command line. In macOS, it depends on the version you’re running, and <\/p>\n","protected":false},"author":1,"featured_media":5887,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1400],"tags":[1944,1943,1408,1922,1945],"_links":{"self":[{"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/posts\/5884"}],"collection":[{"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/comments?post=5884"}],"version-history":[{"count":0,"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/posts\/5884\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/media\/5887"}],"wp:attachment":[{"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/media?parent=5884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/categories?post=5884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tecklyfe.com\/wp-json\/wp\/v2\/tags?post=5884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}ipconfig \/flushdns<\/code> from a command line. In macOS, it depends on the version you’re running, and unfortunately, the command isn’t as easy to remember as it is in Windows.<\/p>\n
How To Flush DNS Cache in MacOS<\/h2>\n
\nThis command will yield better results than the shorter command below.
\nsudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache<\/code><\/p>\n
\nsudo killall -HUP mDNSResponder<\/code><\/p>\n
\nsudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder<\/code><\/p>\n
\nsudo discoveryutil mdnsflushcache<\/code><\/p>\n
\nsudo killall -HUP mDNSResponder<\/code><\/p>\n
\nsudo dscacheutil -flushcache<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"