I work a lot with DNS settings for my websites and apps.
Today I added a few new DNS entries to set up a new server. I used DNS propagation checkers and confirmed that the DNS entries were already updated internationally. But unfortunately, I myself couldn’t access the website on my Windows machine behind my Wifi router. I could, however, access the website with my smartphone after switching off Wifi there.
This left only one conclusion: My browser, Windows OS, or router cached the stale DNS entries.
So the natural question arises:
π¬ Question: How to flush your browser cache, Windows cache, and router cache and reset the DNS entries so they’ll be loaded freshly from the name servers?
I’ll answer these three subproblems one by one in this short tutorial:
- Step 1: Flush your browser DNS cache (Chrome, Edge, Firefox)
- Step 2: Flush your Windows DNS cache
- Step 3: Flush your router DNS cache
Let’s dive into each of them one by one!
Step 1: Reset Your Browser Cache
First, reset your browser cache because it may store some DNS entries. I’ll show you how to flush your browser cache for the three most popular browsers on Windows:
- Chrome
- Edge
- Firefox
Here’s how! π
Clear Cache In Chrome
- Open Chrome
- At the top right, click
More
with the three vertical dots - Click
More tools > Clear browsing data
- Choose a time range. To flush everything, select
All time
- Check boxes next to
Cookies and other site data
andCached images and files
- Click
Clear data
π More here
Clear Cache In Microsoft Edge
Go to Settings
> Privacy, search, and services
> scroll down > click Choose what to clear
> Change the Time range
and check boxes next to Cookies and other site data
and Cached images and files
. Then click Clear now
.
π More here
Clear Cache In Firefox
Click the menu button (three horizontal bars) and select Settings
> Privacy & Security
. Scroll down to Cookies and Site Data
section and click Clear Data...
. Remove check mark in front of Cookies and Site Data
so that only Cached Web Content
is checked. Click the Clear
button.
π More here
Now your browser has no stale DNS entries — but in my case, this didn’t fix the problem. After all, your operating system may have cached it first!
Step 2: Reset Your Windows OS Cache
There’s a long and a short answer to the question on how to flush the Windows operating system cache. In my case, it worked with the shorter answer but you may want to use the long answer instead if you absolutely need to make sure your Windows DNS cache is empty.
How to Flush Your Windows Cache (Short Answer)
Type cmd
into the Windows search field and press Enter
. Type “ipconfig /flushdns
” and press Enter
.
How to Flush Your Windows Cache (Long Answer)
- Type
cmd
into the Windows search field and pressEnter
. - Type “
ipconfig /flushdns
” and pressEnter
. - Type “
ipconfig /registerdns
” and pressEnter
. - Type “
ipconfig /release
” and pressEnter
. - Type “
ipconfig /renew
” and pressEnter
. - Type “
netsh winsock reset
” and pressEnter
. - Restart the computer.
Step 3: Reset Your Router Cache
This one is simple (although a bit time-consuming): To reset your router DNS cache for sure, unplug your router and leave it unplugged for 30 seconds or more. This will reset its DNS cache for sure. Done!