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 18.104.22.168 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
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.
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.
Launch the start menu by pressing the Windows key and search for “CMD.” This should return the command prompt.
In command prompt run the following command:
You will then see a confirmation that it has successfully flushed the DNS resolver cache.
Clear DNS Cache Mac
To clear DNS cache on a Mac, follow the steps below.
Click “Go” up in the toolbar and then “Utilities.” (Shift-Command-U)
Open the Terminal.
Run the following command. You will need administrator access to do this.
sudo killall -HUP mDNSResponder && echo macOS DNS Cache Reset
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.
Input the following in your Chrome address bar and hit “Enter.”
Click on “Clear host cache.”
Recommended tutorial: How to Clear Browser Cache for All Major Browsers