DNS changes are implemented instantly on nameservers, but it may take some time for your computer (or your customers’ computers) to reflect those changes. This delay is due to the Time To Live (TTL) value associated with each DNS record. The TTL value determines how long other DNS servers should cache the record before refreshing their local data. It plays a crucial role in managing DNS traffic across the internet.
Typically, DNS records have a TTL value of 14400 seconds (equivalent to 4 hours). However, some records have a TTL value of 86400 seconds (24 hours), which means it can take up to a day for the changes to propagate.
The TTL delay is further compounded by the fact that operating systems like Windows and Macs cache DNS data to minimize requests made to the Internet Service Provider (ISP). Additionally, web browsers maintain their own local cache, and if you have a broadband router or modem/router, it likely acts as a DNS lookup point, potentially caching responses as well.
To address these caching layers, you have a couple of options available:
- Quick and thorough method: Power down your router/modem and shut down your device(s) for a few minutes. Then, restart them to initiate a fresh DNS cache. Although this method often works, keep in mind that some ISPs may utilize DNS proxies that can cause your router to continue picking up the old address until the ISP’s cache entries are refreshed.
- Clearing the local devices’ DNS cache: Note that this won’t clear your browser cache or the cache on your router. If you want to clear your browser cache, refer to our separate article on that topic. For now, let’s focus on clearing the local device’s DNS cache.
- To bypass your ISP’s DNS servers and potentially improve your DNS resolution speed and reliability, you can configure your device to use third-party DNS servers such as those offered by Cloudflare (1.1.1.1 and 1.0.0.1) or Google (8.8.8.8 and 8.8.4.4). This step is particularly useful if your ISP’s DNS servers are experiencing issues or if you prefer to utilize alternative DNS services.
Windows Instructions for clearing you devices DNS cache:
- Ensure that you are logged in as an administrator, or right-click on “Command Prompt” and select “Run as administrator.”
- Access the Command Prompt by either:
- Clicking the Start button, typing “CMD,” and then pressing Enter.
- Clicking the Start button, scrolling to the Windows System folder, opening the folder, and then selecting Command Prompt.
- In the Command Prompt window, type the following command and press Enter:
codeipconfig /flushdns
- If the command runs successfully, you will see a message similar to the following:
Successfully flushed the DNS Resolver Cache.
By following these steps, you can clear your computer’s DNS cache and ensure that it retrieves the most up-to-date information. Remember that clearing the DNS cache on your local devices does not affect the browser cache or the cache on your router.