Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to lower the TTL value in Directadmin  (Read 4974 times)

0 Members and 1 Guest are viewing this topic.

Vinil

  • Guest
How to lower the TTL value in Directadmin
« on: November 19, 2013, 06:44:24 pm »
There are cases (like migration, IP change, etc) where you need to lower your TTL values of your domains.

The default value set is 14400 seconds (4 hours). ID we need to change the TTL from 14400 to 120 seconds for all domains, run the following:-

Code: [Select]

cd /usr/local/directadmin/data/templates
perl -pi -e 's/14400/120/' named.db
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue



Wait about a minute or 2.  Check your /var/named/*.db files. The TTL should now be 120 instead of 14400.  Once complete, do the same thing, but replace 120 with 14400 and 14400 with 120 in the perl command.


Note: On Debian systems, replace /var/named with /etc/bind.
On FreeBSD systems, replace /var/named with /etc/namedb.