Edit Zone Templates

Valid for versions 86 through the latest version

Version:

86

Last modified: June 13, 2024


Looking for this interface?
Note:

Your hosting provider can enable or disable this interface for resellers in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).

Overview

This interface allows you to edit the templates that cPanel & WHM uses to create DNS zone files for new domains. You may wish to use this interface when you use custom DNS configurations.

Warning:
  • Custom DNS zone templates will not affect subdomains you add to a cPanel account.
  • Custom DNS zone templates will only apply when you create new zone files.
  • The system does not transfer custom DNS zone templates. When you transfer an account with WHM’s Transfer Tool interface (WHM » Home » Transfers » Transfer Tool), the system ignores these zone templates when it recreates the account on the destination server. You must recreate any custom DNS zones on the destination server after you transfer the account.

Edit templates

To edit a template, perform the following steps:

  1. Click the template type that you wish to edit. The template will appear. You can choose from the following template types:
    • simple — Edit the template for domains with only an A entry.
    • standard — Edit the template for domains on a dedicated IP address, addon domains, or parked domains (aliases).
    • standardvirtualftp — Edit the template for domains on a shared IP address.
  2. Make the desired changes to the file.
    • For more information about the available template variables, read the Variables section below.
  3. Click Save.

Variables

You can use the following variables within DNS zone template files:

Variable Description
%cpversion% The version of cPanel & WHM.
%domain% The domain name.
%ftpip% The domain’s FTP server’s IP address.
%ip% The domain’s IPv4 address.
%ipv6% The domain’s IPv6 address.
%maildomain% The hostname of the server that handles the domain’s mail.
%nameserver% The primary nameserver’s hostname for the primary NS record.
%nameserver2% The secondary nameserver’s hostname for the secondary NS record.
%nameserver3% The tertiary nameserver’s hostname for the tertiary NS record.
%nameserver4% The quaternary nameserver’s hostname for the quaternary NS record.
%nameservera% The primary nameserver’s IP address.
%nameservera2% The secondary nameserver’s IP address.
%nameservera3% The tertiary nameserver’s IP address.
%nameservera4% The quaternary nameserver’s IP address.
%nameserverentry% The primary nameserver’s hostname for the glue record. Your system will use this hostname as a registered nameserver for the autocreateaentries setting.
%nameserverentry2% The secondary nameserver’s hostname for the glue record. Your system will use this hostname as a registered nameserver for the autocreateaentries setting.
%nameserverentry3% The tertiary nameserver’s hostname for the glue record. Your system will use this hostname as a registered nameserver for the autocreateaentries setting.
%nameserverentry4% The quaternary nameserver’s hostname for the glue record. Your system will use this hostname as a registered nameserver for the autocreateaentries setting.
%nsttl% The nameserver’s Time to Live (TTL).
%reseller% The reseller who owns the domain.
Important:
If a reseller owns the domain and has created their own DNS zone template files, your domain will apply these templates when you create it.
%rpemail% The contact email address.
%serial% The zone record’s serial number.
%ttl% The domain’s TTL.

Additional Documentation