How to Flush DNS

Clear DNS cache to resolve connection issues

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.

Quick Fix: Flushing DNS is one of the first troubleshooting steps for connection errors and takes less than a minute!

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

  1. Open Command Prompt as Administrator:
    • Press Win + X
    • Click "Windows Terminal (Admin)" or "Command Prompt (Admin)"
    • Or: Search "cmd", right-click, "Run as administrator"
  2. Run DNS Flush Command:
    ipconfig /flushdns
  3. You should see:
    Successfully flushed the DNS Resolver Cache.
  4. Restart your computer (recommended)
  5. Test your connection

Method 2: Full Network Reset

For persistent issues, perform a complete network reset:

  1. Open Command Prompt as Administrator
  2. Run these commands in order:
    ipconfig /flushdns
    ipconfig /registerdns
    ipconfig /release
    ipconfig /renew
    netsh winsock reset
  3. Restart your computer

macOS

All macOS Versions

  1. Open Terminal:
    • Press Cmd + Space
    • Type "Terminal"
    • Press Enter
  2. 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
  3. Enter your password (you won't see it as you type)
  4. Press Enter
  5. No confirmation message means it worked
  6. Restart your Mac (recommended)

Linux

Ubuntu/Debian

  1. Open Terminal
  2. Run command:
    sudo /etc/init.d/nscd restart
    Or for systemd-based systems:
    sudo systemctl restart nscd
    Or for systemd-resolved:
    sudo systemd-resolve --flush-caches
  3. Enter your password
  4. Restart computer (optional but recommended)

Fedora/CentOS/RHEL

  1. Open Terminal
  2. Run command:
    sudo systemctl restart systemd-resolved
    Or:
    sudo systemctl restart NetworkManager
  3. Enter your password

Chrome/Edge Browser Cache

Browsers also cache DNS. Clear browser DNS:

Google Chrome

  1. Open Chrome
  2. Type in address bar: chrome://net-internals/#dns
  3. Click "Clear host cache"
  4. Optional: Visit chrome://net-internals/#sockets
  5. Click "Flush socket pools"
  6. Restart Chrome

Microsoft Edge

  1. Open Edge
  2. Type in address bar: edge://net-internals/#dns
  3. Click "Clear host cache"
  4. Restart Edge

Router DNS Cache

Your router also caches DNS. To flush router cache:

  1. Unplug your router from power
  2. Wait 30 seconds
  3. Plug router back in
  4. Wait for full boot (all lights stable)
  5. Test your connection

Verify DNS Flush Worked

Test if DNS flush was successful:

Windows

  1. Open Command Prompt
  2. Run: ipconfig /displaydns
  3. Should show minimal cached entries

macOS/Linux

  1. Open Terminal
  2. Run: ping google.com
  3. Should resolve immediately
  4. 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

  1. Open SettingsNetwork & Internet
  2. Click Change adapter options
  3. Right-click your network → Properties
  4. Select Internet Protocol Version 4 (TCP/IPv4)
  5. Click Properties
  6. Select "Use the following DNS server addresses"
  7. Enter:
    • Preferred DNS: 8.8.8.8
    • Alternate DNS: 8.8.4.4
  8. Click OK
  9. 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)

  1. Open SettingsNetwork & Internet
  2. Scroll to Advanced network settings
  3. Click Network reset
  4. Click Reset now
  5. Restart your computer

Renew IP Address

Windows:

ipconfig /release
ipconfig /renew

macOS:

  1. System Preferences → Network
  2. Select your connection
  3. Click AdvancedTCP/IP
  4. 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:

Summary Checklist

Follow these steps in order:

  1. ☐ Flush DNS cache using OS-specific command
  2. ☐ Flush browser DNS cache
  3. ☐ Restart router (30 second power cycle)
  4. ☐ Restart computer
  5. ☐ Test connection
  6. ☐ If still failing: Change to public DNS (Google/Cloudflare)
  7. ☐ Flush DNS again after changing DNS providers
  8. ☐ Test connection again
Still Having Issues? Join ModdedMC Discord at discord.gg/mmcn for additional troubleshooting help!

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

Experience This On Our Servers!

Join ModdedMC Network to experience How to Flush DNS and hundreds more mods