Flushing your DNS cache can be helpful in resolving certain internet connection issues or when you’re experiencing DNS-related problems. The process is slightly different depending on the operating system you’re using. Here are instructions for Windows, macOS, and Linux:
Windows:
- Open Command Prompt as Administrator:
- Press
Windows key + X
to open the Power User menu. - Select “Command Prompt (Admin)” or “Windows PowerShell (Admin).”
- If you are using Windows 10 and PowerShell opens, you can proceed with it; the commands are similar.
- Press
- Flush DNS Cache:
- Type the following command and press Enter: ipconfig /flushdns
- Verify:
- You should see a message saying, “Successfully flushed the DNS Resolver Cache.”
macOS:
- Open Terminal:
- You can find Terminal in Applications > Utilities, or use Spotlight Search (
Cmd + Space
and type “Terminal”).
- You can find Terminal in Applications > Utilities, or use Spotlight Search (
- Flush DNS Cache:
- Type the following command and press Enter:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Type the following command and press Enter:
- Enter Your Password:
- You will be prompted to enter your admin password. Note that when you type the password, it won’t be visible on the screen.
Linux:
- Open Terminal:
- Use the keyboard shortcut
Ctrl + Alt + T
or open it from the Applications/Utilities menu.
- Use the keyboard shortcut
- Flush DNS Cache:
- The process may vary depending on your Linux distribution. Try one of the following commands:
- For systems using systemd-resolved (e.g., Ubuntu 18.04 and newer):
sudo systemd-resolve --flush-caches
- For systems using nscd (Name Service Cache Daemon):
sudo service nscd restart
- For systems using dnsmasq:
sudo service dnsmasq restart
- For systems using systemd-resolved (e.g., Ubuntu 18.04 and newer):
- The process may vary depending on your Linux distribution. Try one of the following commands:
- Verify:
- Ensure there are no error messages, and the cache is successfully flushed.
After flushing the DNS cache, you might need to restart your web browser or network services for the changes to take effect. Keep in mind that these steps might not solve all DNS-related issues, but they can be a good initial troubleshooting step.