Den här artikeln finns även på: Svenska
Computers and web browsers uses a build-in cache for DNS requests, making access to domains quicker than if they were to be looked up via public servers on the Internet upon each request. However, problems may arise due to this cache, for example if a domain has been edited to point at another hosting provider’s servers recently. This guide will describe how you clear this cache in Windows 10, macOS and for the web browser Google Chrome.
To clear the DNS cache in Windows, you need to open the program Command Prompt. You can find it via the Start menu, where you search for
Command Prompt, or by holding down the Windows key and then R. Enter
cmd in the box that appears and press Enter.
Once the Command Prompts is open, enter the following command and press Enter:
You will now see a notice that the DNS cache is cleared, and access to the website/domain should work better.
If you use the web browser Google Chrome, it has its own DNS cache, separate from that of the operating system. To clear the DNS cache of Chrome, enter
chrome://net-internals/#dns in the address bar. This will work on Windows, macOS, or mobile phones running Android.
You will now reach a page where you’ll see a button labelled
Clear host cache. Press it to clear the DNS cache of Chrome.
The internal DNS cache of Chrome should now be cleared, and access to the website/domain should work better.
To clear the DNS cache in macOS, you need to open the program Terminal. You can find it via
Terminal. You may also hold down the Command key and press Space. In the box that appears, enter
terminal and press Enter.
Once the terminakl is opened, enter the following command and press Enter.
sudo killall -HUP mDNSResponder
You will now have to enter your Mac’s password and press Enter to continue.
The DNS cache will now be cleared, and access to the website/domain should work better.
To clear the DNS cache on iOS you have two different solutions:
- Start the
Settingsapp and activate
Airplane mode, and then deactivate it again, or;
- Reboot your iPhone.
Regardless of the chosen solution from the two listed above, the DNS cache should now be cleared, and access to the website/domain should work better.