How to Flush the DNS Cache on Your Device
Flushing your DNS cache can resolve connectivity issues by clearing out outdated or corrupted data and forcing your device to retrieve the latest DNS information. Here’s a step-by-step guide for different operating systems.
On Windows
- Open Command Prompt:
- Press
Win + R
to open the Run dialog. - Type
cmd
and press Enter to open Command Prompt.
- Press
- Enter the Command:
- Type the following command and press Enter
ipconfig /flushdns
- Confirmation:
- You should see a message that says, “Successfully flushed the DNS Resolver Cache.”

On macOS
- Open Terminal:
- Press
Command + Space
to open Spotlight Search. - Type
Terminal
and press Enter.
- Press
- Enter the Command:
- Depending on your macOS version, enter the appropriate command:
- For macOS Yosemite and later –
sudo killall -HUP mDNSResponder
- For macOS Lion through Mavericks – sudo killall -HUP mDNSResponder
- For earlier versions, you may need to use – sudo dscacheutil -flushcache
- For macOS Yosemite and later –
- Depending on your macOS version, enter the appropriate command:
- Enter Password:
- You may be prompted to enter your password. Type it and press Enter (your password won’t be visible).
- Confirmation:
- You won’t receive a success message, but the command should complete without errors.
On Linux
- Open Terminal:
- Use
Ctrl + Alt + T
to open Terminal.
- Use
- Enter the Command:
- Most Linux distributions do not cache DNS by default, but if you’re using
systemd-resolved
, you can flush DNS with: – sudo systemd-resolve –flush-caches
- Most Linux distributions do not cache DNS by default, but if you’re using
- Confirmation:
- This command completes without displaying a success message.
On Android
- Open Settings:
- Go to
Settings > Apps
.
- Go to
- Clear Cache for Browser:
- Find your browser in the list of apps, tap it, and select
Clear Cache
.
- Find your browser in the list of apps, tap it, and select
- Restart Device:
- Restarting your Android device also helps clear the DNS cache.
On iOS
- Enable Airplane Mode:
- Swipe down (or up, depending on the device) to access Control Center.
- Turn on Airplane Mode, wait a few seconds, and turn it off.
- Clear Browser Cache:
- Go to
Settings > Safari
. - Tap on
Clear History
and Website Data
.
- Go to
By flushing the DNS cache, your device will have access to the most current DNS information, helping to resolve connectivity and loading issues.
Was this article helpful?
YesNo