Flush DNS: How To Clear Your DNS Cache
Anyone who moves about on the internet leaves a lot of traces – even inexperienced browser users probably know this by now. Website operators use technology such as cookies or JavaScript applications to record the behavior of visitors. The data obtained here is used to optimize the website and personalize the content without users actively disclosing personal details. Many users increasingly rely on ad and JavaScript blockers and proxies or delete history and cookies to put an end to data collection and protect their own privacy.
What is the DNS cache?
DNS servers are used to convert domain names such as www.example.com into numerical addresses that can be processed by computer systems. 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 called and resolved addresses – the DNS caches. These save all information that’s relevant for name resolution, each with an entry known as TTL (time to live) where data 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.
What information does the DNS cache contain?
The information units or entries in the DNS cache are called resource records (RR) and are displayed in ASCII code (in compressed form). The various – partially optional – components include the following:
- Resource data (rdata): Data that describes the record, for example address or host name.
- Record type: Type of the created entry, e.g. “A”: IPv4 address (decimal value: 1) or “AAAA”: IPv6 address (decimal value: 28).
- Record name (optional): Domain name of the object for which the DNS entry was created.
- Time to live (optional): Validity period of the resource record in seconds.
- Class (optional): Protocol group that the RR belongs to (mainly “IN” for internet).
- Resource data length (optional): Value for the length of the resource data.
The DNS cache contains IP addresses for the respective domains or hosts as well as additional information specifying it – such as the validity period of the record or the appropriate protocol group. For example, an entry for the domain www.example.com (IPv4: 172.27.171.105), which should be valid for one error, would look as follows:
www.example.com. 3600 IN A 172.27.171.105
Why is a regular DNS flush useful?
Hide search behavior: While the tracking of user behavior on the internet is primarily carried out by cookies, JavaScript, and others, the DNS cache still offers a potential target for all data collectors. On the basis of the listed addresses, including additional information such as the validity period (if given), you can get an approximate overview of your page history. In any case, your address storage betrays which projects you call up regularly or over a long time. The more comprehensive the collection of cached addresses is, the more you reveal yourself.
Security against manipulation: You should also clear the DNS cache from time to time for security reasons. The information in the cache is practical for delivering web projects – but can quickly become dangerous in the wrong hands. If cybercriminals gain access to the DNS cache, they’re in a position to manipulate the entries and, for example, redirect you to the wrong websites. This so-called DNS poisoning or DNS spoofing is often used to access sensitive log-in data, for example, to online banking. With a DNS flush, you can also dispose of such manipulated records with minimal effort.
Solve technical problems: A DNS flush on Windows, macOS, and others is often an effective solution if you’re experiencing technical problems when accessing web applications. For example, it’s possible that an incorrect version of the called website is being displayed due to outdated entries. In such cases, the domain name is probably filed in the cache with an incorrect or old IP address, which can be remedied by clearing the DNS cache. As a result, the request will once again be directed to the appropriate DNS server and not answered from the cache. With the updated address information, the connection to the web project will once again work as planned.
How to Clear the DNS cache:
There’s no rule about when the perfect moment for a DNS flush is – unless there’s an urgent problem that can be solved by emptying the cache. The DNS cache should also be cleared immediately if you’re redirected to a site that you didn’t call. This may not necessarily be a spoofing attack based on a manipulated DNS entry, but since such an attack can’t be ruled out in principle, a DNS flush is strongly recommended in such cases.
Since the process of a DNS flush varies from system to system, in the following sections we’ve compiled various lists of instructions for individual operating systems.
Windows : How to Flush DNS
You can run a DNS flush via the command prompt. To use this, click on the Windows home button and type “cmd” into the search bar. Then start the command line tool by clicking or pressing enter.
Enter the following command:
ipconfig /flushdns
Start the flushing process by pressing enter. A command line message will inform you of the success of the DNS flush.
![](https://www.future4tech.com/wp-content/uploads/2019/06/image.png)
Linux : How to Flush DNS
Linux systems don’t have a DNS cache by default. The different distributions only offer a function to store DNS information locally with the use of appropriate applications like nscd (name service caching daemon), pdnsd, dns-clean, or dnsmasq. If you use one of these services for caching, you have to control it from the terminal in order to clear the cache.
For pdnsd, there’s a concrete clear command:
sudo pdnsd-ctl empty-cache
To clear the DNS cache from dnsmasq, dns-clean, or ncsd, though, you need to completely restart the respective service:
sudo /etc/init.d/dnsmasq restart
sudo /etc/init.d/nscd restart
sudo /etc/init.d/dns-clean restart
To use DNS caching services in Linux distributions like Ubuntu and clear the cache, you need administrator rights.
Mac: How to Flush DNS
Like Windows, macOS has an integrated DNS cache that automatically collects DNS information and so should be cleared regularly. As opposed to the Microsoft systems, though, the command for resetting the cache varies from version to version. What you need to enter into the terminal to set the DNS register back to zero depends on the edition that you’re working with:
macOS 10.12.0 (Sierra):
sudo killall -HUP mDNSResponder
OS X 10.10.4 (Yosemite) and 10.11.0 (El Capitan):
sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder
OS X 10.10.1 to 10.10.3 (Yosemite):
sudo discoveryutil mdnsflushcache
sudo discoveryutil udnsflushcaches
OS X 10.9.0 (Mavericks):
sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder
Good post. I learn one thing tougher on completely different blogs everyday. It can always be stimulating to read content from different writers and practice a little one thing from their store. I?d choose to make use of some with the content material on my weblog whether you don?t mind. Natually I?ll give you a hyperlink in your net blog. Thanks for sharing.
I’ve been absent for a while, but now I remember why I used to love this web site. Thanks , I?ll try and check back more often. How frequently you update your site?
A lot of blog writers nowadays yet just a few have blog posts worth spending time on reviewing.
I reckon something truly special in this website.
Definitely, what a great blog and revealing posts, I definitely will bookmark your site. Best Regards!
Thanks-a-mundo for the post.Really thank you! Awesome.
As a Newbie, I am continuously exploring online for articles that can be of assistance to me.
Definitely, what a great blog and revealing posts, I definitely will bookmark your site. Best Regards!
I got what you intend,bookmarked, very decent website.
Thanks-a-mundo for the post.Really thank you! Awesome.
Major thanks for the article post. Much thanks again.
Definitely, what a great blog and revealing posts, I definitely will bookmark your site. Best Regards!
Thank you for your post. I really enjoyed reading it, especially because it addressed my issue. It helped me a lot and I hope it will also help others.
Dude these articles are amazing. They helped me a lot.
Thanks for your help and for posting this article. It’s been great.
May I request that you elaborate on that? Your posts have been extremely helpful to me. Thank you!
You should write more articles like this, you really helped me and I love the subject.
Thank you for writing about this topic. It helped me a lot and I hope it can help others too.
Thank you for your excellent articles. May I ask for more information?
Dear can you please write more on this? Your posts are always helpful to me. Thank you!
Dude these articles are great. They helped me a lot.
I reckon something truly special in this website.
This site definitely has all of the information I needed about this subject
I got what you intend,bookmarked, very decent website.
Thank you for writing about this topic. Your post really helped me and I hope it can help others too.
Thank you for your post. I really enjoyed reading it, especially because it addressed my issue. It helped me a lot and I hope it will help others too.
Thank you for writing about this topic. Your post really helped me and I hope it can help others too.
Thank you for writing this post. I like the subject too.
You helped me a lot. These articles are really helpful dude.
Your articles are incredibly helpful to me. Thank you! May I request more information?
As a Newbie, I am always searching online for articles that can help me. Thank you
Very good post.Really looking forward to read more. Great.
This site definitely has all of the information I needed about this subject
Thank you ever so for you blog. Really looking forward to read more.
Wohh precisely what I was searching for, regards for putting up.
It?s arduous to find educated folks on this matter, but you sound like you already know what you?re speaking about! Thanks
Thanks for sharing, this is a fantastic blog post.Really thank you! Much obliged.
A round of applause for your article. Much thanks again.
Wow! Such an amazing and helpful post this is. I really really love it. It’s so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also
Thanks for sharing, this is a fantastic blog post.Really thank you! Much obliged.
There is no doubt that your post was a big help to me. I really enjoyed reading it.
Please answer my question. How can i contact you regards this article?
Please provide me with more details on the topic
Thank you for writing such an excellent article. It helped me a lot and I love the topic.
Thanks for sharing, this is a fantastic blog post.Really thank you! Much obliged.
Wohh precisely what I was searching for, regards for putting up.
You’ve been a big help to me. Thank you!
As a Newbie, I am continuously exploring online for articles that can be of assistance to me.
You should write more articles like this, you really helped me and I love the subject.
Thanks for posting such an excellent article. It helped me a lot and I love the subject matter.
How can I find out more about it?
Thank you for writing this post. I like the subject too.
I must say you’ve been a big help to me. Thanks!
I think this is among the most significant info for me. And i am glad reading your article. But should remark on few general things, The website style is great, the articles is really excellent : D. Good job, cheers
I really enjoyed reading your post and it helped me a lot
Please answer my question. How can i contact you regards this article?
Your articles are extremely helpful to me. May I ask for more information?
Dear can you please write more on this? Your posts are always helpful to me. Thank you!
Thank you for your help and this post. It’s been great.
Hiya, I’m really glad I have found this info. Nowadays bloggers publish just about gossips and internet and this is actually annoying. A good blog with exciting content, this is what I need. Thanks for keeping this site, I’ll be visiting it. Do you do newsletters? Can not find it.
Please provide me with additional details on the matter
Please tell me more about this. May I ask you a question?
Thanks for the help
Thank you for writing about this topic. It helped me a lot and I hope it can help others too.
Dude these articles have been really helpful to me. They really helped me out.
That’s what i mean when i say that content is the king!
Thank you for writing this post!
Please tell me more about your excellent articles
You’ve been great to me. Thank you!
Thank you for writing so many excellent articles. May I request more information on the subject?
I really enjoyed reading your post and it helped me a lot
May I have further information on the topic?
Thank you for your excellent articles. Would you be able to help me out?
What are your articles about? Please tell me more.
Thank you for writing this post!
Please provide me with more details on the topic
Your articles are extremely beneficial to me. May I request more information?
Thank you for your articles. They are very helpful to me. May I ask you a question?
okmark your blog and check again here regularly. I am quite certain I?ll learn plenty of new stuff right here! Good luck for the next!
An interesting discussion is worth comment. I think that you should write more on this topic, it might not be a taboo subject but generally people are not enough to speak on such topics. To the next. Cheers
You are a very smart individual!
Really enjoyed this post.Really thank you! Keep writing. makaberzux
Really enjoyed this post.Really thank you! Keep writing. makaberzux
Really enjoyed this post.Really thank you! Keep writing. makaberzux
Really enjoyed this post.Really thank you! Keep writing. makaberzux
Hey there! Do you use Twitter? I’d like to follow you if that would be ok. I’m definitely enjoying your blog and look forward to new updates.
sure. follow us @
https://twitter.com/future4tech708/
https://www.facebook.com/future4tech
https://www.instagram.com/future4tech708/
https://future4tech.tumblr.com/
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how can we communicate?
My spouse and I stumbled over here coming from a different web address and thought I might as well check things out. I like what I see so now i’m following you. Look forward to finding out about your web page yet again.
a sweet file
hello!,I really like your writing very a lot! proportion we be in contact more about your article on AOL? I need an expert in this house to solve my problem. May be that’s you! Looking forward to look you.
Its like you read my mind! You appear to know so much about this, like you wrote the e book in it or something. I think that you just can do with a few p.c. to power the message house a bit, but other than that, this is great blog. A fantastic read. I will certainly be back.| Harrie Prent Eulalia
Right away I am going away to do my breakfast, after having my breakfast coming yet again to read more news. Deedee Connie Cibis
What a stuff of un-ambiguity and preserveness of valuable knowledge concerning unexpected feelings. Lacee Rip Grim
Valuable info. Lucky me I found your website by accident, and I am shocked why this accident did not happened earlier! I bookmarked it.
I’m impressed, I must say. Actually hardly ever do I encounter a blog that’s both educative and entertaining, and let me let you know, you’ve gotten hit the nail on the head. Your idea is excellent; the difficulty is one thing that not enough individuals are speaking intelligently about. I’m very glad that I stumbled throughout this in my search for one thing relating to this.
Hi there! This post could not be written any better! Reading through this post reminds me of my previous room mate! He always kept talking about this. I will forward this page to him. Pretty sure he will have a good read. Thanks for sharing! Denni Terri Bridge
You ought to take part in a contest for one of the finest websites on the internet. I most certainly will recommend this site! Gusti Pieter Torto
Great, thanks for sharing this post. Thanks Again. Cool. Krissy Cully Melamed
I cannot thank you enough for the article. Really thank you! Keep writing! Nikkie Muffin Liza
You have observed very interesting points! ps decent site. Abbye Griffie Moll Augusta Keven Hendrickson
You are my breathing in, I have few web logs and often run out from to post . Aretha Keefer Steward
Im obliged for the blog post. Much thanks again. Keep writing. Perry Carny Zacherie
Like!! Great article post.Really thank you! Really Cool.