Changing Default Dns Zone Template

samedya

New member
Joined
Jul 13, 2019
Messages
1
hi all, I moved cpanel accounts to da. In cpanel dns zone the www and mail records works with cname by default. But in da side this records come with A by default. How can we edit the default dns zone template and change www, mail records from A to cname? I want to make it default when create new domain. Thanks.
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,853
Location
GMT +7.00
Hello,

There is no sense to do it, and still if you want you can update the templates

/usr/local/directadmin/data/templates/custom/dns_a.conf
/usr/local/directadmin/data/templates/custom/dns_aaaa.conf
/usr/local/directadmin/data/templates/custom/dns_cname.conf

per your needs. Copy them first from /usr/local/directadmin/data/templates/
 

epsilon4

Verified User
Joined
Jul 6, 2019
Messages
18
hi all, I moved cpanel accounts to da. In cpanel dns zone the www and mail records works with cname by default. But in da side this records come with A by default. How can we edit the default dns zone template and change www, mail records from A to cname? I want to make it default when create new domain. Thanks.
Hello,

As zEitEr said, you must copy the following files:

cp /usr/local/directadmin/data/templates/dns_a.conf /usr/local/directadmin/data/templates/custom/dns_a.conf
cp /usr/local/directadmin/data/templates/dns_cname.conf /usr/local/directadmin/data/templates/custom/dns_cname.conf

Later, you need to edit the custom files:

/usr/local/directadmin/data/templates/custom/dns_a.conf

|*if IS_IPV6!="yes"|
|DOMAIN|.=|IP|
|*endif|

/usr/local/directadmin/data/templates/custom/dns_cname.conf

www=|DOMAIN|.
mail=|DOMAIN|.
 
Top