Flush Dns on Mac – The Easy Way

Imagine that you enter a website address and when you click ‘GO’ or ‘ENTER’, you receive an error message. You do this a few times with the same result – you just can’t seem to remember the address correctly. Then you see the commercial again, the one advertising the website address. You rush from the television to your PC frantically repeating the address just so you can remember it this time. It works. The website loads.

How exhausting that must have been. Frankly, having a powerful and memorable website address (or domain name) would have been more helpful. Anyway, your computer does something similar with every attempted website contact. Thankfully, unlike with humans, computers use a more efficient system.

Your computer keeps a record of each of your website visits, successful or not. This is your DNS cache. Domain name systems (DNS) compare the website address you enter against the list of website addresses you have previously visited. This helps to reduce the amount of time it takes to load the page.

DNS Flushing

Overtime, for various reasons, you will need to clear, or flush your DNS cache. One of the main reasons is to remove outdated information. Ever tried to visit a website but received an error message despite knowing the website address is correct? Your DNS cache is to be blamed. You see, DNS works like a translation tool. Websites are not stored under domain names; in other words, their place on the vast Internet is not listed in words.

Instead, website addresses are stored using their IP addresses. If we can hardly remember the website address for one website, imagine remembering its IP address (the more reason to use memorable domain names). Now imagine having to remember the website IP address for every website you wanted to visit.

DNS saves the day by translating the website address you entered into your browser’s search bar into the IP address of that particular website. That is why it needs to keep a record of the sites you visited, to reduce the length of time this process takes.

When IP locations change but website addresses do not, your DNS cache will produce error messages. Flushing your DNS cache forces your computer to search for the website, not against your cache, but from the wider Internet. It is therefore advised that you flush your DNS cache from time to time. However, when you do so is a matter of preference.

Irrespective of your operating system, you will be able to carry out a DNS cache flush using cPanel. The process will be different depending on the computer that you have. This article explains the procedures involved in clearing your DNS cache for Mac users.

What to do before flushing

There are a few pieces of key information that you will need before you are allowed to clear your DNS cache on a Mac.

How to determine your Mac OS/version

The command for flushing DNS cache on a Mac varies according to the version. From Cheetah (released in 2001) to Catalina (released in 2019), there have been 16 versions of the Mac operating system. Catalina’s latest version is 10.15.4.

For DNS cache flush purposes, you should know that several versions use the same command prompt. For example, all operating systems from Lion 10.7 to Catalina 10.15 (Mojave 10.14; High Sierra 10.13; Sierra 10.12; El Capitan 10.11; Yosemite 10.10; Mavericks 10.9; Mountain Lion 10.8; Lion 10.7) use the same command prompt except Yosemite.

Yosemite, the ninth version of the Mac operating system, had five iterations of the software. While versions 10.10.4 and 10.10.5 use the command prompts of those previously mentioned, versions 10.10.1, 10.10.2 and 10.10.3 do not.

To find which version you are using:

  • Click the ‘Apple’ icon at the top right corner of the screen
  • Select ‘About This Mac’

The required information will appear in a dialogue box.

Locate your administrator password

In order to flush your DNS cache, you will need to prove you are authorised to do so by entering the administrator account password. To find out your status:

  • Click the ‘Apple’ icon at the top right corner of the screen
  • Select ‘System Preferences’
  • Click the ‘Users & Groups’ icon

All accounts set up on the device will be displayed, with the word ‘Admin’ beside the one(s) with such privileges.

DNS Cache Flushing Prompts for Macs

If you already know how to flush your DNS cache on your Mac but are simply in need of the command, here you go:

Mac Catalina 10.15; Mojave 10.14; High Sierra 10.13; Sierra 10.12; El Capitan 10.11; Yosemite 10.10.5; Yosemite 10.10.4; Mavericks 10.9; Mountain Lion 10.8; Lion 10.7

  • sudo killall -HUP mDNSResponder

Mac Yosemite 10.10.3; 10.10.2; 10.10.1

  • sudo discoveryutil mdnsflushcache

Mac Snow Leopard (10.6); Leopard (10.5)

  • sudo dscacheutil –flushcache

For others who may need more help, more specific instructions are provided below.

Flushing Your DNS Cache on a Mac

Mac Yosemite 10.10.4 and higher (Yosemite 10.10.5; El Capitan 10.11; Sierra 10.12; High Sierra 10.13; Mojave 10.14; Catalina 10.15)

  • Click on ‘Go’ on the Finder toolbar
  • Choose ‘Applications’
  • Select ‘Utilities’
  • Then ‘Terminal’
  • Enter the following command into the space provided: ‘sudo killall -HUP mDNSResponder’
  • Press ‘Return’
  • Input your administrator account password when prompted to do so
  • Press ‘Return’

DNS cache is now cleared.

Mac Yosemite 10.10.1 – 3

  • Click on ‘Go’ on the Finder toolbar
  • Select ‘Applications’
  • Click ‘Utilities’
  • Then ‘Terminal’
  • Enter the following command into the space provided: ‘sudo discoveryutil mdnsflushcache’
  • Press ‘Return’
  • Input your administrator account password when prompted to do so
  • Press ‘Return’

DNS cache is now cleared.

Mac Lion 10.7; Mountain Lion 10.8; Mavericks 10.9

  • Click on ‘Go’ on the Finder toolbar
  • Click ‘Applications’
  • Select ‘Utilities’
  • Then ‘Terminal’
  • Enter the following command into the space provided: ‘sudo killall -HUP mDNSResponder’
  • Press ‘Return’
  • Input your administrator account password when prompted to do so
  • Press ‘Return’

DNS cache is now cleared.

Mac Leopard (10.5); Snow Leopard (10.6)

  • Click on ‘Go’ on the Finder toolbar
  • Select ‘Applications’
  • Then ‘Utilities’
  • Select ‘Terminal’
  • Enter the following command into the space provided: ‘sudo dscacheutil -flushcache’
  • Press ‘Return’
  • Enter your administrator account password
  • Press ‘Return’

DNS cache is now cleared.

Caution

Flushing the DNS cache will affect any ongoing browsing, so you should try to flush while not browsing.

In The End…

Flushing the DNS cache on your mac is done differently depending on the version of Mac operating system you are using.  You also need to know the requisite command prompt, and you must have the authorization to do so.