DNS (Domain Name System) is like a phone book for the world wide web. Every website and domain is mapped to an IP address. When you type Google.com into your address bar, DNS does the mapping for you behind the scenes. Without DNS you would have to type something like to get to Google. Wouldn’t that be fun!

We then have DNS cache. Just like caching on your WordPress site, DNS cache stores the IP addresses (or locations) you have recently visited locally on your computer. If DNS records become out of date or things change on the web server, you might have to clear DNS cache in order to grab the most up to date records.

DNS Cache Case Scenario

Here is a case scenario that actually happened to us on a client’s site the other day. The client suddenly complained about their images and CSS/Javascript not loading on their website. Their website was loading just fine for us and they ensured us they hadn’t made any recent changes. Upon inspecting their site with Chrome Devtools we could see that everything from their CDN subdomain (cdn.domain.com) were not loading correctly and reporting 404 errors.

Still looking for that perfect WordPress host?

Try Kinsta's premium managed WordPress hosting to experience your site without problems.
  • Styleized controls representing management Fully managed
  • Shield with a tick representing securitySecure like Fort Knox
  • Merging lines representing migrationsFree migrations
  • Three right chevrons representing server speedUltimate speed
  • Circular arrow with center dot representing backupsDaily backups
  • Offset hexagons representing our server stackGoogle Cloud Platform

So the first thing we did was ping the CDN subdomain to see if it was accessible to us. It returned a response just fine. We then ran their CDN URL through the free whatsmydns tool. This allows you to quickly check resolution on DNS records (such as the CDN CNAME) from multiple geographical locations. We wanted to ensure it was loading fine everywhere, beyond just our physical location and that it was resolving back to their CDN provider. And it was.

whatsmydns cname resolution

whatsmydns CNAME resolution

So after the above digging, we confirmed that there was a small change with their DNS provider which was still cached on the client’s end. So we had them clear their DNS cache locally on their computer, refresh the page, and everything started loading again on their WordPress site. Follow the steps below to clear DNS cache on your computer.

Clear DNS Cache Windows

To clear DNS cache on Windows, follow the steps below.

Step 1

Launch the start menu by pressing the Windows key and search for “CMD.” This should return the command prompt.

command prompt windows

Command Prompt in Windows

Step 2

In command prompt run the following command:

ipconfig /flushdns
ipconfig flush dns

ipconfig /flushdns

Step 3

You will then see a confirmation that it has successfully flushed the DNS resolver cache.

flushed dns resolver cache

Flushed DNS resolver cache

Clear DNS Cache Mac

To clear DNS cache on a Mac, follow the steps below.

Step 1

Click “Go” up in the toolbar and then “Utilities.” (Shift-Command-U)

Mac utilities

Mac utilities

Step 2

Open the Terminal.

Struggling with downtime and WordPress problems? Kinsta is the hosting solution designed to save you time! Check out our features
Mac terminal

Mac terminal

Step 3

Run the following command. You will need administrator access to do this.

sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset
Clear DNS cache Mac

Clear DNS cache Mac

After clearing the DNS cache you can then try accessing the domain or website again that was having issues.

Clear Chrome DNS Cache

If you’re still having issues with an IP or domain resolving, you can also try clearing Chrome’s DNS cache, which is different than the local DNS cache.

Step 1

Input the following in your Chrome address bar and hit “Enter.”

Chrome net internals

Chrome net-internals

Step 2

Click on “Clear host cache.”

Clear host cache in Chrome

Clear host cache in Chrome

Recommended tutorial: How to Clear Browser Cache for All Major Browsers