MacOS

How to clear dns cache on macos

To clear the DNS cache on macOS, follow these steps:

1. Open Terminal:
   - You can open Terminal by searching for it using Spotlight (press `Cmd + Space`, then type "Terminal").

2. Run the following command:

   For macOS versions 10.15 (Catalina) and newer:
  

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

   For macOS 10.10.4 (Yosemite) to macOS 10.14 (Mojave):

sudo killall -HUP mDNSResponder

   For macOS 10.10 (Yosemite) versions prior to 10.10.4:

sudo discoveryutil mdnsflushcache

3. Enter your password:
   - When prompted, enter your administrator password.

4. DNS cache cleared:
   - The DNS cache should now be cleared. There is no output from the command, so you won't see confirmation, but the cache will be cleared after running the command.

Your DNS issues should now be resolved, and new DNS queries will be made the next time you access websites.

Thanks for visit my website