When you visit a website you typically type the domain name into your browser’s address bar and press enter. The domain name is actually mapped to an IP address like 192.168.0.1. Imagine having to remember website IP addresses. Luckily you can use the domain name instead. That being the case, your browser has to request the IP address that corresponds to the domain name you typed in. Initially the browser has to request the IP address over the internet which takes time. In order to save time on subsequent requests the browser will keep a database of domain name to IP address mappings locally. This is the DNS cache. Sometimes websites are moved from one server to another which causes the IP address to change. When this happens to a site your browser has saved in the DNS cache the browser will not be able to find the website because the wrong IP address is cached. In this type of situation you can clear your browser’s DNS cache.
Chrome
- In the address bar, type “chrome://net-internals/#dns”
- Click the “Clear host cache” button next to “Host resolver cache”
Firefox
- Click the “Add-ons” button in the Firefox menu
- Search for and install the DNS Flusher add-on
- Restart Firefox
- Click the DNS Flusher “Flush DNS” button
Safari
The DNS cache that Safari uses is actually at the operating system level instead of in the browser. According to Apple support you can clear your DNS cache by restarting your machine. Alternatively you can execute certain commands to clear the DNS cache. Since the DNS cache is at the operating system level the commands differ from one operating system version to the next.
Each of the commands should be typed into a terminal window. Here’s how you open a terminal window:
- Open “Finder”
- Click “Applications”
- Double click “Utilities”
- Double click “Terminal”
OS X Yosemite and later
OS X v10.10.4 or later
sudo killall -HUP mDNSResponder
OS X v10.10 through v10.10.3
sudo discoveryutil mdnsflushcache
OS X Mavericks, Mountain Lion, and Lion
OS X v10.9.5 and earlier
sudo killall -HUP mDNSResponder
Mac OS X Snow Leopard
OS X v10.6 through v10.6.8
sudo dscacheutil -flushcache
Internet Explorer
Internet Explorer uses the operating system’s DNS Resolver Cache for DNS caching. As such, the cache must be cleared at the operating system level by running commands in a Command Prompt window. Opening a Command Prompt window is a little different between Windows versions.
Open a Command Prompt window
Windows 10
- Press the Windows key + x
- Click “Command Prompt (Admin)”
Windows 8
- Press the Windows key + x
- Right-click “Command Prompt”
- Click “Run as Administrator”
Windows 7
- Click the Start button
- Type “cmd” in the search text box
- Right-click on “Command Prompt”
- Click “Run as Administrator”
Clear DNS Resolver Cache
Type the following command in the Command Prompt window then press Enter:
ipconfig /flushdns