This article is about flushing DNS on Ubuntu. But to understand why it is necessary, first you have to understand how DNS works and a little bit about DNS caching.
The journey through the DNS servers takes a while and till it’s complete and a domain name can be resolved to IP addresses, you won’t be able to connect to any website or server on the internet. To solve this issue, DNS caching is used