My BIND9 is currently running fine but is there a way to set the expiration time/date of the cached names? If so, how?

Thanks in advance guys


The expiration time is known as the "TTL" or time to live. You set this variable in you configuration file, typically /etc/bind/db.local or whatever config file you are using.

TTL is in seconds, so set it to a lower value, 60x60 = 3600 for an hour for examlpe

sudo -e /etc/bind/db.local

Set the ttl:

$TTL 3600

and restart bind.

For additional information see:

How do I do a complete BIND9 DNS Server Configuration with a hostname?



  • I'm just using bind as a caching server only. And the only config file I edited was /etc/bind/named.conf.options. The tutorial that I followed was this link. Can I just put the line $TTL 3600 in /etc/bind/named.conf.options? I really appreciate your help man – Abel Melquiades Callejo Feb 18 '14 at 16:52
  • I believe so, is there already a line defining TTL ? If so, then yes. – Panther Feb 18 '14 at 17:01

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.