How to Flush Local DNS Cache on Windows, macOS, and Linux? Print

  • Linux DNS flush, clear DNS cache, Windows DNS flush, DNS refresh, macOS DNS flush, DNS troubleshooting, flush DNS cache, website not found
  • 196

Flushing the DNS cache removes old or corrupted DNS records from your system. This process ensures you get updated DNS information, helping to resolve connectivity issues such as “website not found” errors and speeding up domain resolution.

Why is Flushing DNS Cache Important?

  • Resolves DNS-related issues (e.g., incorrect IP addresses).
  • Ensures access to recently updated websites.
  • Prevents DNS spoofing attacks.
  • Refreshes network configurations after switching DNS servers.

How to Flush DNS Cache on Different Operating Systems

Windows

  1. Open Command Prompt (Search "cmd" and select Run as Administrator).
  2. Run the following command:
    ipconfig /flushdns
  3. You should see: "Successfully flushed the DNS Resolver Cache."

macOS

  1. Open Terminal (Applications → Utilities → Terminal).
  2. For macOS 10.15 (Catalina) and later, use:
    sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  3. Enter your password if prompted, and no output confirms success.

Linux

  1. Open Terminal.
  2. If using systemd-resolved, run:
    sudo systemctl restart systemd-resolved.service
  3. For DNSMasq, use:
    sudo /etc/init.d/dnsmasq restart
  4. No success message will be shown by default.

Troubleshooting Tips

  • If flushing DNS doesn’t solve the issue, try restarting your router.
  • Ensure the DNS servers you’re using are correctly configured.
  • For repeated DNS errors, switch to public DNS like Google DNS (8.8.8.8 & 8.8.4.4).

Need more help? Open a Ticket.


Was this answer helpful?

« Back