How can I clear my DNS cache on Windows and macOS?
Asked on Sep 21, 2025
Answer
To clear your DNS cache, you need to execute specific commands based on your operating system. This process helps resolve DNS-related issues by removing outdated or incorrect DNS records stored on your device.
# Windows
ipconfig /flushdns
# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Additional Comment:
- On Windows, open the Command Prompt as an administrator to run the `ipconfig /flushdns` command.
- On macOS, use the Terminal application to execute the `sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder` command.
- Flushing the DNS cache can help resolve connectivity issues by ensuring your system queries the most current DNS information.
- After clearing the DNS cache, you may need to restart your browser or network connection for changes to take effect.
Recommended Links: