Published: 12th of September, 2024
Hey everyone! Are you having trouble with websites loading slowly or not at all? To solve this problem you might just need to clear your Mac's DNS cache. Clearing this cache is pretty easy so today I'll show you how in just a couple of easy steps.
The Domain Name System, or just "DNS", translates domain names to the numerical IP addresses needed for locating computer services. This let's you type in things like google.com to your browser instead of remembering IP addresses and having to enter those numbers. Think of it as the phonebook of the Internet. Whenever you browse the web your browser will perform many lookups to your DNS server. Your Mac saves this DNS info in a cache (temporary storage) to reduce the number of requests thus loading subsequent pages faster. For example if you visit google.com in Safari, macOS will do a DNS lookup and store it in the DNS cache. If you then visit google.com again a few minutes later it will just use the cached result from the lookup a few minutes ago. If the cached DNS info gets old (us techies call it stale data
) or otherwise messed up, it can cause issues. Clearing your DNS cache can force new correct data to be added thus fixing the problem.
Clearing the DNS cache on macOS is easy, but will require opening the Terminal. Many Mac users might be more used to doing things in a point-and-click fashion, but there's really no need to be intimidated by entering commands because it's all pretty easy once you know how!
Press Command + Space
, type Terminal then press Enter
.Another way to open the Terminal is by using Finder to navigate to Applications
→ Utilities
, then just double-click on Terminal.app
.
In the Terminal window, type the right command for your macOS version:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
sudo killall -HUP mDNSResponder
Now press the enter
key on your keyboard.
Mac will now ask for your password. This is the password you use when turning on your Mac, not your iCloud or any other online password. Type it into the Terminal window (you won't see it) then just hit the enter
key again.
No need to wait for a message or anything — once the command runs, you're all done! Just close Terminal, you can do this by hitting CMD + Q or just typing exit
then hitting enter
.In the unlikely event that you're still having trouble, try restarting your Mac.
Bonus Tip
To further speed up your browsing, block ads and protect your Mac against all sorts of internet nasties you should use iAntiSpy.
Visit it's homepage or the Mac App Store to learn more or download it free.
That's really all it took! Clearing your Mac's DNS cache can and does fix a lot of niggling little internet issues.
Till next time,
✌ Charlie
Recent articles:
Understanding Relocated Items on a Mac: What They Are and How to Handle Them — How to Save Battery on Your Mac: 7 Simple Tips — How to Fix Common Mac Startup Problems — MacBook Wi-Fi Connection Troubleshooting — Speeding Up Your Mac: Chrome and Beyond — Apple Silicon Performance Guide — macOS Malware Trends in 2024: comprehensive analysis — How to Fix MacBook USB Accessories Disabled Errors — How to Clean Your Mac Keyboard Like a Pro — How to Manage System Data on Your iPhone: A Friendly Guide — How to Run .exe Files on your Mac — Top 40 Most Uninstalled Mac Apps of 2024 — How to Securely Erase Your Mac's Hard Drive: A Friendly Guide — Mac running slow? How to speed up a slow Mac — All blog articles
iBoostUp