When we enter applesfera.com in our browser, it takes care of converting the domain into the IP address of the machine that hosts the content. This conversion is made possible by DNS servers from which the Mac temporarily remembers its responses. In general, thanks to this memory, or cache, we can navigate the web more quickly, but it can also give some errors , in this case the solution is easy: we empty the DNS cache of our Mac.
What is that DNS
When we browse the internet, each page we visit has an associated IP address. This address is the one we actually use to connect to the servers that host the page, but for convenience we never enter it in the address bar, where we point domains, for example applesfera.com .
The browser we use must convert the domain (applesfera.com) to the IP address (something like 22.214.171.124, for example). And how does the browser know to which IP to translate each domain? Using a DNS resolver service. The browser asks the service what is the IP of this domain and the service, without going into more details, answers.
DNS resolution service, the equivalent of the internet yellow pages.
For convenience, our Mac temporarily stores a list of the most recent responses it has received from the DNS service . In this way, it should not be asking each time for the IP, which speeds up browsing by reducing response times, no matter how minimal. And it is precisely here where we find the subject of this article. What if our Mac has memorized information that has just changed?
The IPs of the pages and services may change without prior notice and, although the cache is regenerated on a regular basis, this may cause some errors in navigation. It is an unusual situation but, as good advanced Mac users, we must bear in mind if we have verified, for example by visiting some other page, that our connection is good. If so, it is best to empty the DNS cache of our computer.
How to flush the DNS cache
Emptying the DNS cache of our Mac is really simple and we will do it, in this case, from the Terminal. It is true that there are third-party apps, but if we do not want to install any of them, the steps are as follows:
- We open the Terminalapp , which we can search in the LaunchPad or in Spotlight (Command (⌘) + Spacebar).
- We copy and paste: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- We press Enter (↩︎).
- We enter the password of our Mac, which we will not see on the screen.
- We press Enter again.
In iOS 14 and macOS Big Sur Apple will add support for encrypted DNS connections
That easy. Whether on our Mac running Catalina or Big Sur , all DNS resolution memory will be erased and the system will ask for them again. Thus, if there was any erroneous information, it will be eliminated and replaced with the most current one. Will we fix all the navigation errors? Those related to DNS do, so if the error persists we know that we must investigate on other fronts.