How to change default TTL
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?
; 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%
-
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. 0 -
Hi @iso99 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. Any ideas? 0 -
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) 0 -
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.0 -
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:# grep TTL /etc/wwwacct.conf NSTTL 14405 TTL 14406
Thank you.0
Please sign in to leave a comment.
Comments
5 comments