Clearing Your DNS Cache
Your DNS cache stores the locations (IP addresses) of pages you have recently viewed. If the location of the page changes before the entry in your DNS cache is updated, you will be unable to access the page.
If you are encountering a high number of HTML 404 error codes, you may need to flush your DNS cache. Once you clear your DNS cache, your computer will query nameservers for the new DNS information you require.
For more information about the HTML 404 error code, please visit the HTML 404 Wikipedia article.
The methods detailed below allow you to remove old and inaccurate DNS information that may result in 404 errors.
Clearing the DNS cache on a device can often resolve internet connectivity issues, like problems accessing websites or online services. The process varies depending on the operating system of the device. Here’s a guide to the most common systems:
For Windows:
- Open Command Prompt: Press
Windows key + R
, typecmd
, and press Enter. - Run the Flush Command: Type
ipconfig /flushdns
and press Enter. You should see a message confirming the DNS Resolver Cache has been flushed.
For macOS:
- Open Terminal: You can find it in Applications under Utilities, or search for it using Spotlight.
- Run the Flush Command: The command varies by macOS version. For recent versions (macOS Sierra and later), type
sudo killall -HUP mDNSResponder
and press Enter. Enter your password when prompted.
For Linux:
- Open Terminal: You can usually find it in your applications menu or search for it.
- Flush DNS Cache: The command depends on the service used for DNS caching. For a system using
systemd-resolved
, typesudo systemd-resolve --flush-caches
.
For Android:
- Restart Your Device: Android doesn’t typically provide a built-in option to flush the DNS cache. Restarting the device is usually the most straightforward way.
- Use a Third-Party App: Some apps can manage this, but be cautious about permissions and security.
For iOS:
- Enable Airplane Mode: Go to Settings, and toggle Airplane Mode on, wait a few seconds, then turn it off.
- Restart Your Device: If toggling Airplane Mode doesn’t work, try restarting your iOS device.
Remember, after clearing the DNS cache, your device might take a little longer to load websites as it rebuilds the cache with new DNS information.