How to Clear Your Computer's DNS Cache on Mac and Windows
Clearing your DNS cache can help resolve DNS-related issues such as website loading problems or DNS errors. Below are the steps to clear the DNS cache on both Mac and Windows operating systems.
Clearing DNS Cache on Mac
- Open the Terminal application. You can find it by searching in Spotlight or navigating to
Applications > Utilities > Terminal
. - Once Terminal is open, type the following command and press Enter:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- You may be prompted to enter your administrator password. Type it in (note that the characters won't appear on the screen) and press Enter.
- Your DNS cache is now cleared.
Clearing DNS Cache on Windows
- Press Win + R on your keyboard to open the Run dialog box.
- Type
cmd
and press Enter to open the Command Prompt. - In the Command Prompt window, type the following command and press Enter:
ipconfig /flushdns
- You should see a confirmation message stating that the DNS Resolver Cache was successfully flushed.
After clearing the DNS cache, any DNS-related issues should be resolved. If problems persist, consider restarting your computer or checking your network settings.