This article explains how to clear the local DNS cache. It can be useful if you’ve made changes to a site but can’t see them on your computer.
Clearing cache on Windows computers
- Press Windows key + X
- Select “Run” and in the new window type cmd then press Enter
- At the command prompt (CMD) enter the following command: ipconfig /flushdns and press Enter
- That’s it. Your computer’s cache has now been cleared
Clearing cache on Mac OS computers
- Go to Applications, then Utilities and open the Terminal app
- Enter the following command depending on your Mac OS version:
- From El Capitan to Mojave: sudo killall -HUP mDNSResponder
- Big Sur: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- After entering the command press Enter. You may be asked for your Mac password, enter it
- That’s it. Your computer’s cache has now been cleared
Clearing cache on Linux computers
- In the terminal, enter the command: sudo systemd-resolve –flush-caches
- Then you can check cache statistics using this command: sudo systemd-resolve –statistics
- The last command will display cache statistics in a table; under Current Cache Size you should see 0