How to Flush your DNS Cache on Mac

Sometimes a developer has to reset its DNS cache to avoid site preview errors (most of the time when a server transfer occurs).

This article will explain how to flush DNS cache from your Mac!

What is DNS?

DNS, or the Domain Name System, translates human-readable domain names (for example, www.amazon.com) to machine-readable IP addresses (for example, 192.0.2.44).

This article will explain how to flush DNS cache from your Mac!

Flush DNS cache on Mac

To flush DNS cache on your Mac, open your Terminal and run this command:

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

You might need to reset the DNS cache also from your Chrome browser, to do it:

  • visit: chrome://net-internals/#dns
  • click: “Clear host cache” button
  • restart Chrome

--

--

--

I’m a software engineer based in Milan. Always looking to discover new development methods and technologies, I am an open source enthusiast and supporter.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is crypto-jacking?

What you need to know about the CEH v11 (update 2022)

{UPDATE} City Tour Adventure Car Race Hack Free Resources Generator

{UPDATE} 卡通超人超级争霸战 Hack Free Resources Generator

Game1Network Week 5 Recap, 2 September to 8 September 2021

{UPDATE} PickAPair Chichewa Hack Free Resources Generator

How to Log in to Your Account

How to Delete All-czech.com/search

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Andrea Pollastri

Andrea Pollastri

I’m a software engineer based in Milan. Always looking to discover new development methods and technologies, I am an open source enthusiast and supporter.

More from Medium

Create a script to compress folders in ZIP with PHP

PHP vs Python — Pick the Right Language for Web Development Project

PHP vs Python - Pick the Right Language for Web Development Project Featured Image

Top 12 Software Outsourcing Questions and Answers

Learning basic information about software outsourcing before hiring software engineers from an experienced software development team is critical

An Opinionated Guide to Setting up Git