Bobcares

How to lower TTL just before an IP change in directadmin

by | Apr 8, 2023

Learn how to lower TTL just before an IP change in DirectAdmin. Our DirectAdmin Support team is here to help you with your questions and concerns.

How to lower TTL just before an IP change in DirectAdmin

Did you know that lowering the TTL or Time-to-Live of DNS records is commonly done ahead of an IP address change?

This helps reduce the amount of time that DNS resolvers cache our old IP address. It also speeds up the propagation of the new IP address. Here are the steps to lower the TTL just before an IP change in DirectAdmin:

How to lower TTL just before an IP change in DirectAdminLet’s take a look at how to lower the TTL just before an IP change in DirectAdmin:

  1. First, log in to the DirectAdmin control panel as an admin.
  2. Then, head to DNS Management under the Advanced Features section.
  3. Next, locate the domain for which we want to lower the TTL and then click the Edit button next to it.
  4. At this point, we have to scroll down to the Records section and locate the SOA record.
  5. Now, click the Edit button next to it and enter a lower value than the default value of 14400 seconds in the TTL field.
  6. Finally, save the changes.

We have to repeat these steps for other records that we want to update with a lower TTL. For instance, A records or MX records.

Alternatively, we can run the following code:

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

In the above example, the default value of 14440 has been changed to 300.

After running the above code, we have a few minutes before checking the /var/named/*.db files. The TTL will now be 300 instead of 14400. After the Ip address change, we can revert back to the default value by replacing 300 with 14400 and 14400 with 300 in the Perl command.

Our experts would like to point out that we can run the Perl command in /var/named/domain.com.db, rather than the named.db file and restart named if we are running the code for just one domain.

Since lowering the TTL too much can increase traffic to our DNS servers, it is a good idea to do it temporarily just before the IP address change and then revert it back to the default value after the change is complete.

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

In summary, our Support Techs demonstrated how to lower TTL just before an IP change in DirectAdmin.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.