Well, simply because when your DNS is cached, nameservers or domain name may not resolve to the correct IP and may lead you to a cached website, or worst, failure to establish a connection to the respective website.
How Do I Reset My Mac’s DNS?
In this post, I will show you how to clear and reset DNS cache on your macOS Ventura (Version 13.0).
Step 1
Launch Terminal app. You can do it swiftly by executing this keyboard shortcut Command + Space. Then type in Terminal, then hit Enter.
Step 2
Copy the following command into Terminal, and hit Return.
sudo killall -HUP mDNSResponder; sleep 2;
Step 3
Enter your macOS’s password, and hit Return again.
Step 4
Quit Terminal by using the keyboard shortcut: Command + Q.
That’s it, simple as that. Your DNS cache should now be cleared.
How to Reset DNS Cache in Older Macs?
If you are using older versions of macOS, targeting the mDNSResponder
process using the above command may not work. If you are using macOS 12 (Monterey) or below, refer to the following list for the correct command to use.
“Monterey” (Version 12)
1 sudo
dscacheutil -flushcache;
sudo
killall -HUP mDNSResponder
“Big Sur” (Version 11)
1 sudo
dscacheutil -flushcache;
sudo
killall -HUP mDNSResponder
“Catalina” (Version 10.15)
1 sudo
dscacheutil -flushcache;
sudo
killall -HUP mDNSResponder
“Mojave” (Version 10.14)
1 sudo
killall -HUP mDNSResponder;
sleep
2
“High Sierra” (Version 10.13)
1 sudo
killall -HUP mDNSResponder;
sleep
2
“Sierra” (Version 10.12)
1 sudo
killall -HUP mDNSResponder
“El Capitan” (Version 10.11)
1 sudo
dscacheutil -flushcache;
sudo
killall -HUP mDNSResponder
“Yosemite” (Version 10.10)
1 sudo
discoveryutil mdnsflushcache;
sudo
discoveryutil udnsflushcaches
“Mavericks” (Version 10.9)
1 dscacheutil -flushcache;
sudo
killall -HUP mDNSResponder
“Mountain Lion” (Version 10.8)
1 sudo
killall -HUP mDNSResponder
“Lion” (Version 10.7)
1 sudo
killall -HUP mDNSResponder
“Snow Leopard” (Version 10.6)
1 sudo
dscacheutil -flushcache
“Leopard” (Version 10.5)
1 sudo
dscacheutil -flushcache
“Tiger” (Version 10.4)
1 lookupd -flushcache
Frequently Asked Questions:
- Is it safe to clean up DNS cache?
it is generally safe to clear the DNS cache on a Mac. The DNS cache stores information about previously accessed websites and their corresponding IP addresses, so clearing the cache can help resolve issues with accessing certain websites or if changes have been made to DNS records.
- Does clearing DNS cache speed up internet?
Clearing the DNS cache on a Mac is generally a good practice to help maintain a healthy system and avoid potential issues with accessing websites. But it may not always result in a significant improvement in internet speed.
- Will DNS on my Mac updates automatically?
DNS information on your Mac should update automatically as needed. However, in some cases, you may need to clear the DNS cache on your Mac manually to resolve issues with accessing websites. Overall, you shouldn’t need to worry too much about managing DNS information on your Mac, as it should update automatically as needed. But if you do encounter issues with accessing websites, clearing the DNS cache can sometimes help.
Happy learning!