System Cache/Flush DNS – What it is and how it’s done

Flush DNS

Flush DNS – Operating systems such as Windows automatically generate temporary entries of visited websites in a so-called DNS cache. The information contained in the cache is valid for a defined period of time. A DNS flush, i.e. emptying of the cache, removes the data from the system before the time limit expires.

Understanding DNS

Before exploring DNS flushing, it’s crucial to understand DNS (Domain Name System). DNS is the phonebook of the internet, translating human-friendly domain names into IP addresses that computers understand. When you visit a website, your computer performs a DNS lookup to find its IP address.

What is a DNS flush?

DNS flush is the process of manually deleting the temporary entries of a DNS cache. Without a direct intervention in the cache, the entries exist until their defined life span (“time to live”, TTL) has expired.

Generally, the deletion process is completed using system-specific flush DNS command line tools. On Mac, for example, you use Terminal and the appropriate command for the particular version of the Apple system. In Windows, you flush the DNS via CMD, i.e. via the command prompt, and using the command “ipconfig /flushdns”.

What is the DNS cache?

DNS servers are used to convert domain names such as www.example.com into numerical addresses. These “name servers” are contacted by default via the browser each time the corresponding projects are accessed, which slightly increases their loading time and can also lead to a DNS server overload in the case of a high number of visitors. Error messages like “DNS Server Not Responding” are a common and despised consequence.

For this reason, operating systems like Windows and macOS attach their own cache for accessed and resolved addresses – the DNS caches. These save all information that’s relevant for name resolution such as an IP address, host names and protocol versions. Each entry remains valid for a given time. Within this time, corresponding queries are answered directly from the cache without requiring a detour to the DNS server.

Why Flush DNS?

  1. Updated Information: Websites may change their IP addresses. Your DNS cache might have the old address, leading to errors when accessing the site. Flushing the DNS updates this information.
  2. Corrupted Cache: Occasionally, the cache may get corrupted due to technical glitches or malware, causing DNS errors.
  3. Privacy Reasons: The DNS cache can reveal your browsing history, which might be a privacy concern for some users.

When to Flush DNS

  1. When you can’t access a website, but others can.
  2. After changing DNS settings on your device or network.
  3. If you suspect your cache has been corrupted.
  4. After you launch a new website.

Why Should You Flush DNS (or Clear) Your DNS?

Flushing your DNS has several advantages, such as:

  • hiding your search behavior from data collectors who might show you ads based on your search history
  • requesting that an updated version of a website or web app is loaded. This can help resolve 404 issues if a website or web app was migrated to a new domain
  • preventing DNS cache poisoning – a security situation in which black hat hackers gain maliciously gain access to your DNS cache and alter them so you get redirected to a website where sensitive information might be collected from you

How to Flush Your DNS on Windows

To flush your DNS records on Windows 10, follow the steps below:

Step 1: Click on Start or hit the Windows key on your keyboard

Step 2: Type “cmd”, then select “Run as Administrator” on the right

Step 3: Type in “ipconfig /flushdns” and hit ENTER

You should get a response that the DNS cache has been flushed like the one below:

This means that your cache has been completely cleared, and fresh versions of any website you visit will be loaded.