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.

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

You may also like...

109 Responses

  1. Liebespuppen says:

    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.

  2. daget 4d says:

    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?

  3. pornodom.top says:

    A lot of blog writers nowadays yet just a few have blog posts worth spending time on reviewing.

  4. pornodom.top says:

    I reckon something truly special in this website.

  5. pornodom.top says:

    Definitely, what a great blog and revealing posts, I definitely will bookmark your site. Best Regards!

  6. pornodom.top says:

    Thanks-a-mundo for the post.Really thank you! Awesome.

  7. анальный гангбанг says:

    As a Newbie, I am continuously exploring online for articles that can be of assistance to me.

  8. подборка анала says:

    Definitely, what a great blog and revealing posts, I definitely will bookmark your site. Best Regards!

  9. домашние оргазмы says:

    I got what you intend,bookmarked, very decent website.

  10. домашка со студентками says:

    Thanks-a-mundo for the post.Really thank you! Awesome.

  11. домашний оргазм says:

    Major thanks for the article post. Much thanks again.

  12. русское красивое порно видео says:

    Definitely, what a great blog and revealing posts, I definitely will bookmark your site. Best Regards!

  13. Selena Edney says:

    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.

  14. Franklyn Maugeri says:

    Dude these articles are amazing. They helped me a lot.

  15. Denita Verdugo says:

    Thanks for your help and for posting this article. It’s been great.

  16. Billie Aakre says:

    May I request that you elaborate on that? Your posts have been extremely helpful to me. Thank you!

  17. Nathanael Wiszynski says:

    You should write more articles like this, you really helped me and I love the subject.

  18. Shanon Pasillas says:

    Thank you for writing about this topic. It helped me a lot and I hope it can help others too.

  19. Vina Benincase says:

    Thank you for your excellent articles. May I ask for more information?

  20. Aretha Tiff says:

    Dear can you please write more on this? Your posts are always helpful to me. Thank you!

  21. Alyce Kazeck says:

    Dude these articles are great. They helped me a lot.

  22. сексуальный массаж says:

    I reckon something truly special in this website.

  23. изнасиловали порно says:

    This site definitely has all of the information I needed about this subject

  24. порно износ says:

    I got what you intend,bookmarked, very decent website.

  25. Val Maldonado says:

    Thank you for writing about this topic. Your post really helped me and I hope it can help others too.

  26. Cornelius Ramella says:

    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.

  27. Clifford Ecton says:

    Thank you for writing about this topic. Your post really helped me and I hope it can help others too.

  28. Ismael Duplechain says:

    Thank you for writing this post. I like the subject too.

  29. Stan Hoblit says:

    You helped me a lot. These articles are really helpful dude.

  30. Cristobal Fung says:

    Your articles are incredibly helpful to me. Thank you! May I request more information?

  31. частное порно молодых says:

    As a Newbie, I am always searching online for articles that can help me. Thank you

  32. русские студенты порно бесплатно says:

    Very good post.Really looking forward to read more. Great.

  33. смотреть порно онлайн анал says:

    This site definitely has all of the information I needed about this subject

  34. порно домашнее порно says:

    Thank you ever so for you blog. Really looking forward to read more.

  35. подборка анала says:

    Wohh precisely what I was searching for, regards for putting up.

  36. Escort in Delhi says:

    It?s arduous to find educated folks on this matter, but you sound like you already know what you?re speaking about! Thanks

  37. очень красивый анал says:

    Thanks for sharing, this is a fantastic blog post.Really thank you! Much obliged.

  38. порно зрелых says:

    A round of applause for your article. Much thanks again.

  39. entrepreneur health says:

    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

  40. русское домашнее порно онлайн бесплатно says:

    Thanks for sharing, this is a fantastic blog post.Really thank you! Much obliged.

  41. Lester Aspri says:

    There is no doubt that your post was a big help to me. I really enjoyed reading it.

  42. Kris Gack says:

    Please answer my question. How can i contact you regards this article?

  43. Jason Konstantinidi says:

    Please provide me with more details on the topic

  44. Donovan Ragazzo says:

    Thank you for writing such an excellent article. It helped me a lot and I love the topic.

  45. pornodom.top says:

    Thanks for sharing, this is a fantastic blog post.Really thank you! Much obliged.

  46. pornodom.top says:

    Wohh precisely what I was searching for, regards for putting up.

  47. Omer Harborth says:

    You’ve been a big help to me. Thank you!

  48. мамашки says:

    As a Newbie, I am continuously exploring online for articles that can be of assistance to me.

  49. Desmond Iacono says:

    You should write more articles like this, you really helped me and I love the subject.

  50. Lewis Hand says:

    Thanks for posting such an excellent article. It helped me a lot and I love the subject matter.

  51. Wilfred Laurent says:

    How can I find out more about it?

  52. Giuseppe Mellerson says:

    Thank you for writing this post. I like the subject too.

  53. Malik Abatti says:

    I must say you’ve been a big help to me. Thanks!

  54. online fabric store says:

    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

  55. Audrie Wasik says:

    I really enjoyed reading your post and it helped me a lot

  56. Owen Bruemmer says:

    Please answer my question. How can i contact you regards this article?

  57. Byron Maultasch says:

    Your articles are extremely helpful to me. May I ask for more information?

  58. Aaron Poths says:

    Dear can you please write more on this? Your posts are always helpful to me. Thank you!

  59. Bridget Mendel says:

    Thank you for your help and this post. It’s been great.

  60. mateusz says:

    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.

  61. Jayna Lieske says:

    Please provide me with additional details on the matter

  62. Renay Delettre says:

    Please tell me more about this. May I ask you a question?

  63. Delia Cantoral says:

    Thanks for the help

  64. George Ganim says:

    Thank you for writing about this topic. It helped me a lot and I hope it can help others too.

  65. Vicente Deponte says:

    Dude these articles have been really helpful to me. They really helped me out.

  66. Mohamed Doxon says:

    That’s what i mean when i say that content is the king!

  67. Marion Personius says:

    Thank you for writing this post!

  68. Alysia Faggett says:

    Please tell me more about your excellent articles

  69. Madalene Hipkins says:

    You’ve been great to me. Thank you!

  70. Quinn Wilker says:

    Thank you for writing so many excellent articles. May I request more information on the subject?

  71. Ericka Faubert says:

    I really enjoyed reading your post and it helped me a lot

  72. Celestina Majocka says:

    May I have further information on the topic?

  73. Antione Nathan says:

    Thank you for your excellent articles. Would you be able to help me out?

  74. Chang Bayless says:

    What are your articles about? Please tell me more.

  75. Aron Founds says:

    Thank you for writing this post!

  76. Davida Wucherer says:

    Please provide me with more details on the topic

  77. Isidro Esfahani says:

    Your articles are extremely beneficial to me. May I request more information?

  78. Bea Parson says:

    Thank you for your articles. They are very helpful to me. May I ask you a question?

  79. sports news says:

    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!

  80. zoritoler imol says:

    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

  81. zoritoler imol says:

    You are a very smart individual!

  82. amateur incest porn says:

    Really enjoyed this post.Really thank you! Keep writing. makaberzux

  83. incestporn.vip says:

    Really enjoyed this post.Really thank you! Keep writing. makaberzux

  84. russian incest sex says:

    Really enjoyed this post.Really thank you! Keep writing. makaberzux

  85. father and daughter incest sex says:

    Really enjoyed this post.Really thank you! Keep writing. makaberzux

  86. gralion torile says:

    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.

  87. zoritoler imol says:

    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?

  88. graliontorile says:

    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.

  89. replica magic says:

    a sweet file

  90. froleprotrem says:

    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.

  91. bedava says:

    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

  92. 720p says:

    Right away I am going away to do my breakfast, after having my breakfast coming yet again to read more news. Deedee Connie Cibis

  93. online says:

    What a stuff of un-ambiguity and preserveness of valuable knowledge concerning unexpected feelings. Lacee Rip Grim

  94. zortilonrel says:

    Valuable info. Lucky me I found your website by accident, and I am shocked why this accident did not happened earlier! I bookmarked it.

  95. frolep rotrem says:

    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.

  96. movie online says:

    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

  97. movie download says:

    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

  98. dublaj says:

    Great, thanks for sharing this post. Thanks Again. Cool. Krissy Cully Melamed

  99. netflix says:

    I cannot thank you enough for the article. Really thank you! Keep writing! Nikkie Muffin Liza

  100. bollywood says:

    You have observed very interesting points! ps decent site. Abbye Griffie Moll Augusta Keven Hendrickson

  101. erotik says:

    You are my breathing in, I have few web logs and often run out from to post . Aretha Keefer Steward

  102. indir says:

    Im obliged for the blog post. Much thanks again. Keep writing. Perry Carny Zacherie

  103. ปั้มไลค์ says:

    Like!! Great article post.Really thank you! Really Cool.

  1. September 14, 2022

    […] Suggested Read: What is TTL(Time To Live)? DNS server software available for (Linux/Windows) Flush DNS: How To Clear Your DNS Cache […]

  2. September 16, 2022

    […] Read: What is TTL(Time To Live)? DNS server software available for (Linux/Windows) Flush DNS: How To Clear Your DNS Cache What is […]

  3. September 17, 2022

    […] Read: DNS server software available for (Linux/Windows) Flush DNS: How To Clear Your DNS Cache What is […]

  4. September 18, 2022

    […] Suggested Read: Most common types of DNS records What is DNS? Flush DNS: How To Clear Your DNS Cache […]

  5. September 18, 2022

    […] Read: DNS server software available for (Linux/Windows) Flush DNS: How To Clear Your DNS Cache What is […]

Leave a Reply

Your email address will not be published. Required fields are marked *