akust0m

Well-Known Member
Feb 19, 2016
72
4
58
Melbourne
cPanel Access Level
Root Administrator
Hello,

I see that the default zone TTL is governed by the variable %ttl% and the NS TTL is governed by %nsttl%. Both of these appears to be set to 14400. It also appears that automatically generated TXT records also have a default TTL of 14400.

Is there a way to change the value of %ttl% and %nsttl% and the TXT default TTL's? Or do I simply change these variables to a static value that I desire in the zone templates?

Code:
; cPanel %cpversion%
; Zone file for %domain%
$TTL %ttl%
@      %nsttl%    IN      SOA     %nameserver%. %rpemail%. (
        %serial%    ; serial, todays date+todays
        3600        ; refresh, seconds
        7200        ; retry, seconds
        1209600        ; expire, seconds
        3600 )        ; minimum, seconds

%domain%. %nsttl% IN NS %nameserver%.
%domain%. %nsttl% IN NS %nameserver2%.
%domain%. %nsttl% IN NS %nameserver3%.
%domain%. %nsttl% IN NS %nameserver4%.

%nameserverentry%. IN A %nameservera%
%nameserverentry2%. IN A %nameservera2%
%nameserverentry3%. IN A %nameservera3%
%nameserverentry4%. IN A %nameservera4%

%domain%. IN A %ip%
%domain%. IN AAAA %ipv6%

%domain%. IN MX 0 %domain%.

mail IN CNAME %domain%.
www IN CNAME %domain%.
ftp IN A %ftpip%
ftp IN AAAA %ipv6%
 

iso99

Well-Known Member
Jan 5, 2011
112
7
68
cPanel Access Level
Root Administrator
Try Basic cPanel & WHM setup. The default 14400 is there.

If that's not what you're looking for, I think the default Zone templates are a good start.
 

hrace009

Well-Known Member
Dec 24, 2013
75
10
8
Root
cPanel Access Level
Root Administrator
Twitter
In WHM, search tool top left corner, type in TTL, to get to the settings for TTL here:
Home »DNS Functions »Set Zone Time To Live (TTL)
It will only set currently domain and subdomain, when you create new domain, it will keep to 14400, evently we already set it at Basic cPanel & WHM setup, it will keep 14400 for new domain.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Thank you! That has helped. The last thing I want to fix is the default TTL for TXT records. They still seem to get the default 14400.
Hello,

Could you let us know how you are adding the TXT record? It's following the configured value under "WHM Home » Server Configuration » Basic WebHost Manager® Setup" when creating an account on a test system:

Code:
# grep TTL /etc/wwwacct.conf
NSTTL 14405
TTL 14406
Thank you.