How to Clear Your DNS Cache: Windows & Mac (2026 Guide) | | Gotmyhost

If you are seeing “Site Not Found” or 404 Errors on websites you know are active, your computer’s DNS cache might be outdated. This cache stores the IP addresses of web servers you’ve recently visited. When a website moves to a new server, your computer may still try to use the old, “stale” address.

Flushing your DNS forces your system to ask nameservers for the most current information, resolving connectivity issues instantly.


How to Clear DNS Cache on Windows

Regardless of your Windows version, the process primarily uses the Command Prompt.

Windows 11 and Windows 10

  1. Press the Windows Key + S and type Command Prompt.
  2. Right-click the app and select Run as Administrator.
  3. In the black window, type the following command and press Enter:ipconfig /flushdns
  4. Success Message: “Windows IP configuration successfully flushed the DNS Resolver Cache.”

Windows 8 / 8.1

  1. Press Windows Key + X to open the Quick Access menu.
  2. Select Command Prompt (Admin).
  3. Type ipconfig /flushdns and press Enter.

Legacy Windows (7, Vista, XP)

  • Windows 7/Vista: Click Start, type cmd in the search box, right-click it, and select Run as Administrator.
  • Windows XP: Click Start > Run, type cmd, and press Enter.
  • Command: Type ipconfig /flushdns and press Enter.

How to Clear DNS Cache on macOS

On a Mac, you use the Terminal app to reset your DNS. Note that you will need your administrator password to complete this.

macOS Monterey, Ventura, Sonoma, and Sequoia (Modern Versions)

  1. Open Finder, go to Applications > Utilities, and double-click Terminal.
  2. Copy and paste the following command:sudo killall -HUP mDNSResponder
  3. Press Enter. You will be prompted for your Admin Password (bullets won’t show as you type).
  4. Press Enter again.

Older macOS Versions

VersionCommand
OS X 10.10.4+sudo killall -HUP mDNSResponder
OS X 10.10.1–10.10.3sudo discoveryutil mdnsflushcache
OS X 10.7 – 10.9sudo killall -HUP mDNSResponder
OS X 10.5 – 10.6sudo dscacheutil -flushcache

Why Should You Flush Your DNS?

  • Fix 404 Errors: Connect to websites that have recently changed their hosting or IP address.
  • Security: Clear out “DNS Spoofing” or “Cache Poisoning” attempts where hackers try to redirect your traffic to fraudulent sites.
  • Privacy: Erase the local record of the web addresses you have visited.

Pro Tip: If flushing your DNS doesn’t fix the issue, try clearing your browser’s cookies and cache as a secondary step.

Leave a Reply

Your email address will not be published. Required fields are marked *