Help Docs Liquid Web Portal Domains and DNS DNS Management Flushing Your Local DNS Cache

Flushing Your Local DNS Cache

Clear outdated DNS data. Flush your local DNS cache on Windows, macOS, and Linux to fix connection errors and see site updates instantly.

Introduction

Your computer saves (caches) DNS records to load websites faster. However, if a website moves to a new server or changes its IP address, this saved data can become outdated, preventing you from seeing the new site. “Flushing” the cache forces your computer to look up the new, correct DNS records.

Prerequisites

  • Admin access on your local computer.

Step-by-Step Instructions

Commands are Operating System-specific. Find your system, below:

Windows

  1. Open the Command Line.
    • Windows 10/11: Right-click the Start button and select Windows Terminal (Admin), PowerShell (Admin), or Command Prompt (Admin).
    • Older Versions: Search for cmd in the Start menu, right-click Command Prompt, and select Run as Administrator.
  2. Type the following command and press Enter:
ipconfig /flushdns

  1. You should see the message: Successfully flushed the DNS Resolver Cache.

Mac OS X

  1. Press Command + Space to open Spotlight, type Terminal, and press Enter.
  2. Copy and paste the command below that matches your OS version. You will be asked for your administrator password (it will not show on screen as you type).

macOS 11 (Big Sur), 12 (Monterey), 13 (Ventura), 14 (Sonoma), 15 (Sequoia) & newer:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

macOS 10.11 (El Capitan) through 10.15 (Catalina):

sudo killall -HUP mDNSResponder

Linux

Your Distribution May Use A Remote DNS Resolver

Many current Linux distributions do not utilize local DNS resolver cache like Windows and Mac OS X. Check the website for your Linux distribution to find information regarding default included software to find out if your Linux installation uses local DNS caching.

Most modern Linux distributions (Ubuntu 18.04+, Fedora, etc.) use systemd-resolved.

For Systemd-based distributions (Modern Ubuntu, Debian, Fedora)

sudo resolvectl flush-caches

For distributions using NSCD

sudo /etc/init.d/nscd restart

Frequently Asked Questions (FAQ)

If flushing your computer’s DNS didn’t work, the old data might be cached elsewhere. Try these steps:

  1. Clear your browser cache: Your web browser (Chrome, Firefox, etc..) has its own internal DNS cache you may need to clear.
  2. Restart your router: Your internet router also caches DNS data. Unplugging it for 30 seconds often clears this.
  3. Wait for propagation: If you recently changed your DNS records, the update might not have propagated to your Internet Service Provider (ISP) yet.
  4. Try a different network: If your ISP is caching outdated DNS records, you may need to test on a separate connection. Try disconnecting your mobile phone from Wi-Fi and loading the site using cellular data, or vice versa.

No. It actually might make the very first time you visit a website slightly slower (milliseconds), because your computer has to look up the address again. However, it fixes connection errors caused by outdated data.

Click the Apple Icon in the top-left corner of your screen and select About This Mac. The version name and number will be displayed in the window.

Yes. On Windows, you must run the command prompt as an Admin. On macOS and Linux, you must use sudo (SuperUser Do) and provide your password.

Was this article helpful?