Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Mass DNS TTL change par account

Monarobase shared this idea 6 years ago
Open Discussion

I would like to have the ability to perform a mass TTL change for all domains on a single account, and would like to have a similar interface as the currrent one but with account users instead of domains.

I would like to be able to exclude from this list suspended accounts as you very rarely would want to migrate a suspended account, especially as some of the suspended accounts might be suspended due to a migration to another server.

The current mass TTL change system doesn't work well when you use DNS Clustering as you can't restrict your selection to domains that are only on the server.

I see two usages for this :

1) To prepare a full server migration (you need to reduce the TTL of all domains on one server)

2) To prepare a single account migration (you need to reduce the TTL of all domains on that account)

Replies (4)


Hey Monarobase,

We do have a script that does most of the functionality that you are looking for.

  1. /usr/local/cpanel/bin/set_zone_ttl --help

    /usr/local/cpanel/bin/set_zone_ttl: Command line tool to update the TTL values for specified DNS Zones.



    You must specify at least one of the following options:

    --domain : Sets the TTL on all of the DNS records for the specified domain.

    --user : Sets the TTL on all of the domains that belong to the specified user.

    --reseller: Sets the TTL on all of the domains that belong to users owned by the specified reseller.

    --all : Sets the TTL on all of the domains on the server.


    --force : Used to bypass confirmation dialogs.

    --newttl: The new TTL value to use (Default: 3600 seconds).

    --nosync: Do NOT sync changes across the DNS cluster after the modifications are made.

    NOTE: If this switch is not specified, then the changes WILL be synced to all servers configured to "Synchronize Changes" in WHM's "DNS Cluster" interface.


Great, that will help us even though a graphical interface would be nice.

Will -all only apply ttl to domains on the serveur or to the whole DNS cluster ?

If it applys DNS to the whole DNS cluster I suppose we could write a script that applies TTL for each user on the server.

I presume that using this script, it wouldn't be that difficult to implement a web interface for these features.


If you do --nosync it will not do the whole DNS cluster. You can do a whole server using --all. However, I do not think you can do the whole cluster at once. A web interface could be possible but is not on our list of priorities right now.



I'll contact support about this. I only want to change the ttl for accounts on that sever. I don't want to do it for all dns zones on that server as some dns zones have been moved to other servers. That's why I need to know if all is all user accounts or if it is all dns zones.

If it's all user accounts then it's OK, if it's all DNS zones then it's probably got the same bug as the web gui. If this is the case, then for the moment it's dangerous to use on servers configured as write only in a DNS cluster.

Leave a Comment
Attach a file