How to Flush DNS Cache in Windows and Mac OS

By Shivam VishwakarmaUpdated Oct 7, 2026

DNS cache stores domain lookup information locally to improve browsing speed. If DNS records have recently changed, your device may still use outdated information. Flushing the DNS cache clears the stored records and forces the system to retrieve updated DNS information.

  1. Microsoft Windows

The following command will work on Windows 7, 8, 10 + Windows Server, but opening the command prompt is slightly different for each version.

Steps to Flush DNS Cache on Windows

  1. Right-click on the Start Menu.

  2. Select Command Prompt (Admin) or Windows PowerShell (Admin).

  3. In the command window, type the following command:

CMD:   ipconfig /flushdns

  1. Press Enter.

Windows 10 Flush DNS - Step 1 - Begin on the Windows 10 desktopWindows 10 Flush DNS - Step 2 - Right click on the start menu and choose 'Command Prompt (Admin)'Windows 10 Flush DNS - Step 3 - Command Prompt will openWindows 10 Flush DNS - Step 4 - Type 'ipconfig /flushdns'Windows 10 Flush DNS - Step 5 - The DNS is now flushedWindows 10 Flush DNS - Step 6 - Type 'exit' to close the Command Prompt
  1. Apple MacOS and Mac OS X

From the Mac Terminal app, you need to run the following command depending on your version:

MacOS 11 & 12 (Big Sur, Monterey)

MacOS 10.12 - 10.15 (Sierra, High Sierra, Mojave, Catalina)

Mac OS X 10.7 - 10.9 & 10.11 (Lion, Mountain Lion, Mavericks, El Capitan)

Steps to Flush DNS Cache on macOS

  1. Open Finder.

  2. Navigate to Applications → Utilities.

  3. Open the Terminal application.

  4. Enter the following command:

CMD:   sudo killall -HUP mDNSResponder

  1. Press Enter.

MacOS Flush DNS - Step 1 - Begin on the MacOS desktopMacOS Flush DNS - Step 2 - Open Finder and go to the Utilities folder in Applications'MacOS Flush DNS - Step 3 - Find the Terminal applicationMacOS Flush DNS - Step 4 - Open the Terminal applicationMacOS Flush DNS - Step 5 - Type 'sudo killall -HUP mDNSResponder'MacOS Flush DNS - Step 6 - Enter your password and press return

Mac OS X 10.10 (Yosemite)

sudo discoveryutil mdnsflushcache

Mac OS X 10.6 (Snow Leopard)

sudo dscacheutil -flushcache

Mac OS X 10.5 (Leopard) and below

sudo lookupd -flushcache

Expected Result

After flushing the DNS cache, the device will query DNS servers for the latest records, which can help resolve website accessibility and DNS propagation issues.

Common Use Cases

  • Website not loading after DNS changes

  • Domain pointing to an old IP address

  • Recent A record, CNAME, or MX record updates

  • SSL validation issues

  • DNS propagation troubleshooting

Resolution

Flush the DNS cache using the appropriate command for your operating system and then reopen the browser to verify the latest DNS records are being used.

 

  • DNS Flush

Was this article helpful?

How to Flush DNS Cache in Windows and Mac OS · Knowledge Base