How to Clear DNS Cache on Mac

Websites not loading right on your Mac?It might be your DNS cache. Don’t worry — clearing it is super easy…

Websites not loading right on your Mac?
It might be your DNS cache. Don’t worry — clearing it is super easy and can fix most browsing issues in seconds. Let’s walk you through it


1. Open the Terminal app on your Mac

  1. Press Command (⌘) + Space to launch Spotlight Search
  2. Type Terminal, then press Enter to launch it

2. Enter this command in Terminal

Copy the following command and paste it into Terminal, then press Return:

Terminal
Loading...


Here’s what this command means

  • Stops macOS from using outdated DNS entries
  • Forces your Mac to re-fetch DNS info
  • Refreshes local DNS resolver cache


Done — the DNS cache has been successfully flushed

You’ve successfully cleared the DNS cache on your Mac.
This helps fix loading issues and makes sure websites connect the right way.
For best results, repeat this process after switching Wi-Fi networks, using a VPN, or changing your DNS settings.