Get a Pentest and security assessment of your IT network.

Cyber Security

Clear Your DNS Cache

TL;DR

Yes, you can clear your computer’s DNS cache to resolve internet connection issues or ensure you’re seeing the latest website versions. The process varies depending on your operating system (Windows, macOS, Linux).

Clearing Your DNS Cache: A Step-by-Step Guide

  1. Understand What a DNS Cache Is
    • Your computer stores recently visited website addresses and their corresponding IP addresses in a DNS cache.
    • This speeds up browsing, but sometimes the information becomes outdated or corrupted.
    • Clearing it forces your computer to request fresh data from your DNS server.
  2. Windows
    1. Using Command Prompt (Admin)
      • Open the Command Prompt as an administrator. Search for ‘cmd’, right-click, and select ‘Run as administrator’.
      • Type the following command and press Enter:
        ipconfig /flushdns
      • You should see a message confirming the cache has been successfully flushed.
    2. Using PowerShell (Admin)
      • Open PowerShell as an administrator. Search for ‘powershell’, right-click, and select ‘Run as administrator’.
      • Type the following command and press Enter:
        Clear-DnsClientCache
      • No output means it worked successfully.
  3. macOS
    1. For macOS 10.12 Sierra and later:
      • Open Terminal (Applications > Utilities).
      • Type the following command and press Enter:
        sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
      • You will be prompted for your administrator password. Enter it and press Enter. Note that you won’t see any characters appear as you type the password.
    2. For older macOS versions:
      • Open Terminal (Applications > Utilities).
      • Type the following command and press Enter:
        sudo discoveryutil mdnsflushcache
      • You will be prompted for your administrator password. Enter it and press Enter.
  4. Linux
    1. The command varies depending on the systemd-resolved service used.
      • systemd-resolved (most modern distributions):
        sudo systemd-resolve --flush-caches
      • nscd:
        sudo /etc/init.d/nscd restart
      • dnsmasq:
        sudo /etc/init.d/dnsmasq restart
  5. Restart Your Browser
    • After clearing the DNS cache, close and reopen your web browser to ensure it picks up the changes.
  6. Verify the Change (Optional)
    • Visit a website you recently had trouble with. If the issue is resolved, the DNS cache clear was successful.

If problems persist after clearing your DNS cache, consider checking your router settings or contacting your internet service provider.

Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation