How to Flush DNS Cache
Flushing your DNS cache clears stored domain name records, forcing your computer to fetch fresh DNS information. This can resolve connection issues, including Minecraft server connectivity problems.
Why Flush DNS?
Common reasons to flush DNS cache:
- Connection Errors: Can't connect to Minecraft servers
- DNS Poisoning: Cached malicious or incorrect DNS entries
- Server IP Changes: Server moved to new IP but old one is cached
- General Troubleshooting: First step in network debugging
- Website Not Loading: Cached DNS preventing access to updated sites
Windows 10/11
Method 1: Command Prompt
- Open Command Prompt as Administrator:
- Press
Win + X
- Click "Windows Terminal (Admin)" or "Command Prompt (Admin)"
- Or: Search "cmd", right-click, "Run as administrator"
- Press
- Run DNS Flush Command:
ipconfig /flushdns
- You should see:
Successfully flushed the DNS Resolver Cache.
- Restart your computer (recommended)
- Test your connection
Method 2: Full Network Reset
For persistent issues, perform a complete network reset:
- Open Command Prompt as Administrator
- Run these commands in order:
ipconfig /flushdns ipconfig /registerdns ipconfig /release ipconfig /renew netsh winsock reset
- Restart your computer
macOS
All macOS Versions
- Open Terminal:
- Press
Cmd + Space
- Type "Terminal"
- Press Enter
- Press
- Run command based on your macOS version:
macOS Ventura (13) and later:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
macOS Monterey (12) and earlier:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
macOS Big Sur (11):
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Enter your password (you won't see it as you type)
- Press Enter
- No confirmation message means it worked
- Restart your Mac (recommended)
Linux
Ubuntu/Debian
- Open Terminal
- Run command:
Or for systemd-based systems:sudo /etc/init.d/nscd restart
Or for systemd-resolved:sudo systemctl restart nscd
sudo systemd-resolve --flush-caches
- Enter your password
- Restart computer (optional but recommended)
Fedora/CentOS/RHEL
- Open Terminal
- Run command:
Or:sudo systemctl restart systemd-resolved
sudo systemctl restart NetworkManager
- Enter your password
Chrome/Edge Browser Cache
Browsers also cache DNS. Clear browser DNS:
Google Chrome
- Open Chrome
- Type in address bar:
chrome://net-internals/#dns
- Click "Clear host cache"
- Optional: Visit
chrome://net-internals/#sockets
- Click "Flush socket pools"
- Restart Chrome
Microsoft Edge
- Open Edge
- Type in address bar:
edge://net-internals/#dns
- Click "Clear host cache"
- Restart Edge
Router DNS Cache
Your router also caches DNS. To flush router cache:
- Unplug your router from power
- Wait 30 seconds
- Plug router back in
- Wait for full boot (all lights stable)
- Test your connection
Verify DNS Flush Worked
Test if DNS flush was successful:
Windows
- Open Command Prompt
- Run:
ipconfig /displaydns
- Should show minimal cached entries
macOS/Linux
- Open Terminal
- Run:
ping google.com
- Should resolve immediately
- Press
Ctrl + C
to stop
Alternative: Change DNS Servers
If flushing doesn't help, switch to public DNS servers:
Recommended DNS Servers
Provider | Primary DNS | Secondary DNS |
---|---|---|
Google DNS | 8.8.8.8 | 8.8.4.4 |
Cloudflare DNS | 1.1.1.1 | 1.0.0.1 |
OpenDNS | 208.67.222.222 | 208.67.220.220 |
Change DNS on Windows
- Open Settings → Network & Internet
- Click Change adapter options
- Right-click your network → Properties
- Select Internet Protocol Version 4 (TCP/IPv4)
- Click Properties
- Select "Use the following DNS server addresses"
- Enter:
- Preferred DNS:
8.8.8.8
- Alternate DNS:
8.8.4.4
- Preferred DNS:
- Click OK
- Flush DNS again after changing
When to Flush DNS
Flush DNS cache when experiencing:
- Minecraft Connection Errors: Can't connect to servers
- "Connection Reset" Errors: Persistent connection issues
- Website Not Loading: Specific sites won't load
- After Network Changes: Changed ISP, router, or network
- VPN Issues: VPN not connecting properly
- DNS Errors: "DNS_PROBE_FINISHED_NXDOMAIN" or similar
Additional Network Troubleshooting
Reset Network Settings (Windows)
- Open Settings → Network & Internet
- Scroll to Advanced network settings
- Click Network reset
- Click Reset now
- Restart your computer
Renew IP Address
Windows:
ipconfig /release
ipconfig /renew
macOS:
- System Preferences → Network
- Select your connection
- Click Advanced → TCP/IP
- Click Renew DHCP Lease
Common DNS Issues in Minecraft
Can't Resolve Server Address
- Flush DNS as described above
- Try IP Address: Use server's IP instead of domain name
- Check Server Status: Verify server is actually online
- Firewall: Ensure Minecraft is allowed through firewall
Connection Timeout
- Flush DNS
- Change DNS Provider: Switch to Google or Cloudflare DNS
- Disable VPN: Test without VPN
- Router Restart: Power cycle your router
Prevention Tips
- Regular Flushing: Flush DNS monthly as maintenance
- Use Public DNS: More reliable than ISP DNS
- Keep Systems Updated: Update Windows/macOS regularly
- Avoid DNS Hijacking: Use reputable DNS providers
- Router Firmware: Keep router firmware up to date
Related Issues
If flushing DNS doesn't solve your issue:
- Connection Reset Error: See our detailed guide
- Authentication Error: Authentication troubleshooting
- NullPointerException: NPE error solutions
Summary Checklist
Follow these steps in order:
- ☐ Flush DNS cache using OS-specific command
- ☐ Flush browser DNS cache
- ☐ Restart router (30 second power cycle)
- ☐ Restart computer
- ☐ Test connection
- ☐ If still failing: Change to public DNS (Google/Cloudflare)
- ☐ Flush DNS again after changing DNS providers
- ☐ Test connection again
Additional Resources
- ModdedMC Discord: discord.gg/mmcn
- Support Tickets: moddedmc.net/tickets
- Google Public DNS: developers.google.com/speed/public-dns
- Cloudflare DNS: 1.1.1.1