How to Clear DNS Cache on Apple/Mac
Clearing the DNS cache on a Mac can help resolve issues related to domain name resolution, such as problems accessing websites or seeing outdated content. Here’s how you can do it:
For macOS Ventura and Later
- Open Terminal:
- You can find Terminal by going to Applications > Utilities > Terminal or by using Spotlight Search (press
Command + Space
and type “Terminal”).
- Run the DNS Flush Command:
- Enter the following command and press
Enter
:sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- You might be prompted to enter your administrator password.
- Close Terminal:
- After running the command, you can close the Terminal window.
For macOS Monterey and Earlier
- Open Terminal:
- Find it in Applications > Utilities > Terminal or use Spotlight Search.
- Run the Appropriate DNS Flush Command:
- Depending on your version of macOS, use one of the following commands:
- macOS Mojave and macOS Catalina:
sudo killall -HUP mDNSResponder
- macOS Sierra and macOS High Sierra:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- macOS El Capitan:
sudo dscacheutil -flushcache
- Enter your administrator password if prompted.
- Close Terminal:
- After executing the command, you can close the Terminal window.
Additional Notes
- No Confirmation: There’s typically no confirmation message after flushing the DNS cache. If the command runs without errors, the cache has been cleared.
- Restarting: If you continue to have issues after clearing the DNS cache, try restarting your Mac or your router.
Clearing the DNS cache can help resolve various network-related issues and is a useful troubleshooting step when experiencing connectivity problems or outdated site content.