How to Reset DNS Cache in macOS High Sierra
Need to reset and clear DNS cache in macOS High Sierra? Some Mac users may need to occasionally reset their local DNS cache, typically because the Mac DNS settings have changed, or a particular name server or domain is cached and they need to flush existing DNS cache.
While it’s most often web developers, systems administrators, and network admins that fiddle with DNS and have to reset and clear their DNS caches, sometimes other Mac users need to clear the DNS caches as well.
In macOS High Sierra, you can reset DNS cache by targeting the mDNSResponder process via the command line available in Terminal app. This is similar to clearing DNS cache in macOS Sierra and El Capitan, though the process to reset DNS cache has changed many times throughout the history of the Mac OS and Mac OS X operating system.
How to Reset DNS Cache in MacOS High Sierra
Note that resetting and flushing DNS cache will likely interrupt any active internet activity or usage.
- Launch the Terminal application, it is found within the /Applications/Utilities/ folder on a Mac
- At the command line, enter the following syntax:
- Hit the Return key and then enter the administrator password, then hit return again
- Wait a moment, when you see the text “macOS DNS Cache Reset” appear in Terminal the DNS cache reset has been successful
- Exit Terminal
sudo killall -HUP mDNSResponder; sleep 2; echo macOS DNS Cache Reset | say
You may need to quit and relaunch certain internet connected applications for the changes to take effect, though most web browsers can suffice with a simple refresh.
If the above approach doesn’t work for whatever reason, you can break the command syntax down into smaller components:
sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset
This applies for macOS High Sierra, which is versioned as Mac OS 10.13.x. Users interested in learning how to reset DNS cache in prior versions of MacOS can learn how to do so for Sierra, El Capitan, Yosemite, and earlier versions of Mac OS X if desired.