While so many preferences and tools are available on our computers these days, sometimes nothing beats a good old-fashioned command line tool. This is especially important for networking information, no matter what operating system you’re on.

One of the most important systems on the Web is the Domain Name System, or DNS. This matches friendly website names to IP addresses, so when you go to google.com your browser knows which IP address to request.

DNS usually works without a hitch, but since it’s cached, sometimes it can get stuck or point to an address that is outdated. When this happens, you might see DNS-related error messages pop up on every website you try to visit, or maybe just a few.

In Mac OS X, you can easily clear the DNS cache to get a fresh try in just a few quick steps. First, you’ll need to open a Terminal. The quickest way to do this is to press Command + Space to open Spotlight search. Type Terminal and press Return to launch a command line.

The command here differs slightly depending on which OS you’re running. Click the Apple logo in the upper-left corner of your screen and choose About This Mac to find out what version of OS X you have installed.

If you’re OS X Yosemite version 10.10.4 or newer (including El Capitan), the command is as follows:

sudo killall -HUP mDNSResponder

Running OS X Mavericks version v10.9.5 or earlier? The command you need is:

sudo killall -HUP mDNSResponder

Still running Snow Leopard? It’s probably time to upgrade your Mac! Until then, however, use this command:

sudo dscacheutil -flushcache

Clearing DNS can’t harm a thing, so don’t worry about misuse of this command. Give it a try next time you’re troubleshooting connection issues!

Related:  How to Install & Remove Mac Software: 5 Easy Methods

Do you ever have to clear DNS cache to resolve errors? Let us know how often you see this error in the comments!

Image Credit: argus via Shutterstock.com

There are no comments yet