Troubleshooting

How To Flush DNS

Here’s an updated version of the article with improved formatting, clarity, and added guidance for modern macOS versions:


Why Clear Your DNS Cache?

Flushing, or clearing your computer’s DNS cache, forces your computer to reload DNS information from the DNS server. This can be useful when experiencing issues viewing websites, email servers, or when a website has recently moved to a new server or IP address.

Why Clear Your DNS Cache?

Clearing your DNS cache can help if:
– You’re having trouble accessing websites or email servers.
– A website’s server or IP address has changed, and your computer still has the old data cached.

Before You Start:

Before flushing the DNS cache, close the following applications to ensure no cached data remains in use:
– Web browsers (e.g., Chrome, Firefox, Edge).
– Email applications (e.g., Outlook, Mail).

How to Flush DNS in Windows

Follow these steps to clear the DNS cache in Windows:

  1. Open the Start menu by clicking the Windows Logo.
  2. Search for cmd in the Start menu.
  3. Right-click Command Prompt and select Run as administrator.
  4. Click Yes on the User Account Control (UAC) prompt.
  5. In the Command Prompt, enter the following command:
    ipconfig /flushdns
  6. Press Enter. A message confirming the successful flush will appear.

Note: This command discards all cached DNS entries, including negative cache entries and any dynamically added entries.
Source: Microsoft.com

How to Flush DNS in macOS

For macOS users, the process to clear the DNS cache differs slightly depending on the macOS version. Here’s the latest method:

macOS (Mojave and newer)

  1. Open Terminal. You can find it in the Applications > Utilities folder or by searching for “Terminal” using Spotlight.
  2. In the Terminal window, enter the following command:
    sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder
  3. Press Enter. You may be prompted to enter your Mac user password. Type it and press Enter.

After a brief moment, the DNS cache will be cleared.

macOS (Older Versions)

For older macOS versions, the command may differ slightly:
– OS X Yosemite:
sudo discoveryutil mdnsflushcache;sudo discoveryutil udnsflushcaches
– OS X Mavericks, Mountain Lion, and Lion:
sudo killall -HUP mDNSResponder

Was this guide helpful?

Need help with this?

Open a ticket and link to this guide so our team can see what you have tried.

View support tickets

Power your business with Ecenica Hosting

Built for WordPress and serious websites. Fast, secure and supported by real people in the UK.

Ecenica hosting services represented by a connected red route across London