Your device’s DNS cache lets you visit your favorite websites without having to go through DNS resolution every time — but if your DNS records are outdated, you could run into connectivity issues. Read on to learn how you can flush DNS records to clear your DNS cache.

All major operating systems and browsers support DNS cache clearing. The instructions below will teach you how to flush DNS cache entries on macOS, Windows, and Linux devices, as well as the popular Google Chrome browser.

How to clear DNS cache entries on macOS

  1. Press the smiling blue face icon to open “Finder” and click on “Applications.”
  2. Open the “Utilities” folder and launch “Terminal.”
  3. Based on your OS, type in the appropriate command to flush DNS records:
    • Tiger (10.4): lookupd -flushcache
    • Leopard (10.5): sudo lookupd -flushcache
    • Snow Leopard (10.6): sudo dscacheutil -flushcache
    • Lion (10.7), Mountain Lion (10.8), Mavericks (10.9): sudo killall -HUP mDNSResponder
    • Yosemite (10.10): sudo discoveryutil mdnsflushcache
    • El Capitan (10.11), Sierra (10.12), High Sierra (10.13), Mojave (10.14), Catalina (10.15): sudo killall -HUP mDNSResponder
    • Big Sur (11), Monterey (12), Ventura (13): sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  4. Enter your password and press “Enter.” If you are successful, you will see a message stating that you’ve reset your DNS cache.

How to clear DNS cache entries on Windows

To flush DNS records on a Windows device, you will need to use the command prompt. The process is nearly identical for Windows XP, Windows Vista, Windows 7, and later Windows OS. Simply follow these steps:

  1. Click the “Start” button in the bottom-left corner of your screen.
  2. Open the command prompt:
    • Windows 10, Windows 11: Select “Command prompt” directly from the list.
    • Windows XP, Windows Vista, Windows 7, Windows 8: Click “All programs,” select “Accessories,” and choose “Command prompt.”
  3. In the command prompt window, type the following command: ipconfig /flushdns.
  4. Press “Enter” to confirm. If you are successful, you will see a message stating that the DNS resolver cache has been flushed.

How to clear DNS cache entries on Linux

The Linux operating system doesn’t come with DNS caching capabilities by default — this feature is implemented differently by each distribution. Here is what you need to do to clear DNS records on the most popular versions:

  1. Open the terminal by pressing Ctrl, Alt, and T simultaneously.
  2. Based on your distribution, enter the following command to flush DNS:
    1. Ubuntu: sudo systemd-resolve –flush-caches
    2. NCSD: sudo /etc/init.d/nscd restart
    3. Dnsmasq: sudo /etc/init.d/dnsmasq restart
    4. BIND: sudo /etc/init.d/named restart
  3. If prompted, enter your password to confirm that you want to flush DNS cache records.

How to clear DNS cache entries on Google Chrome

Browsers have their own DNS caches, separate from your operating system. If you flush DNS on your device but not your browser, you could still end up using outdated DNS records while browsing. Here’s what you need for a clean start on Google Chrome:

  1. Open Google Chrome on your device.
  2. Enter the following in the address bar: chrome://net-internals/#dns
  3. Click “Clear host cache” to flush DNS records.

 

 

Share the Post:

Related Posts