Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.46

(Home >> DNS Functions >> Edit DNS Zone)

Overview

This feature allows you to edit the records in a domain’s DNS zone file.

Warning

If your DNS records are configured incorrectly, visitors may be unable to access your domain.

Edit a DNS zone

To edit a DNS zone, perform the following steps:

  1. Click the domain whose zone that you wish to edit.
  2. Click Edit.

WHM displays the Edit DNS Zone interface. At the top, you will see the following information about the domain:

  • Editing zone — Displays the name of the domain whose zone record(s) you wish to edit.
  • cPanel first — Shows the cPanel version and build number that is installed on your server when you created the zone.
  • latest — Shows the most recent cPanel version and build number installed on your server.
  • Cpanel:: ZoneFile::VERSION — Shows which zonefile version cPanel uses.
  • mtime — The date and time (in Unix time) the zone file was last edited.
  • $TTL — The default time to live, in seconds. This specifies how long zone data should be cached (saved in memory) by clients (for example, a visitor’s web browser), if not specified for each record below.

 

 
The Edit DNS Zone interface with Zone File Information.

 

Beneath this information, the Edit DNS Zone interface displays a table of editable text fields which contains the DNS entries for the domain.

The column headings are:

  • Domain — The name of the domain associated with the entry.
  • TTL — The time to live, or length of time that the DNS entry should be cached by the client.
  • Record type —The type of DNS record.

    Warning

    Although the Class field is editable, if it contains anything other than "IN," it will result in an error.

DNS record types

This is a list of the most common DNS record types. 

Record TypesDescriptionDetails
SOAStart of Authority record

Contains authoritative information—that is, information on record with an accredited domain name registrar—about the domain. This includes:

  • The authoritative nameserver’s hostname.
  • The server administrator’s contact email with a period [.] in place of the @ sign.
  • Time information and several other settings, which dictate how clients should store the domain’s DNS data:
    • Serial number — This number consists of the year, month, date, and time the record was last edited.
    • Refresh — The time interval which should elapse before the client should refresh zone data.
    • Retry — The time interval which should elapse before the client should try again after a failed refresh attempt.
    • Expire — The time interval after which the record is no longer authoritative.
    • Minimum TTL — The minimum time to live, or length of time that any DNS information from this zone should be cached.
NSNameserver record Specifies the hostname that clients will refer to when they look for your domain.
 AAddress recordMatches your domain name to an IP address. 
MX  Mail Exchange recordMatches your domain name to a list of servers which handle mail for your domain and tags each with a priority (the highest priority is 0).
CNAMECanonical name record

Matches your domain name to an alias. This is useful if you are choose to run a server besides an Apache server, such as an FTP server, on a separate port.

 

Editable Entries on the Edit DNS Zone Interface.

 

You can add new entries to the DNS record in the empty text fields at the bottom of the interface.

Warning

If your DNS records are not configured correctly, visitors may be unable to access your domain.

When you have entered the information, click Save.

 
Empty Text Fields for New Entries on the Edit DNS Zone Interface.

How to set a separate IP address for your domain and mailserver

If you change the IP address of your domain's A record, the IP address of your mail server automatically changes as well. This happens because the standard zone template uses a CNAME record to point mail to the A record of a domain. If you wish to assign an IP address to the mailserver, which is different from the IP address for the domain's A record, perform the following steps:

  1. Change the MX record to mail.$domain., where $domain. represents your domain. For example, example.com. would change to mail.example.com.
  2. Change the CNAME for mail into an A record to the IP address of the mail server.
  3. Click Save.

Important

 You must include the trailing period after mail.example.com.

To change the zone template so that all new domains will create MX records which assign your mailserver a different IP address, perform the following steps:

  1. Navigate to WHM's Edit Zone Templates interface in WHM. ( Home >> DNS Functions >> Edit Zone Templates ).
  2. Click standard.
  3. Change %domain%. IN MX 0 %domain%. to %domain%. IN MX 0 mail.%domain%.
  4. Change mail IN CNAME %domain%. to mail IN A %IP%.
  5. Click Save.

Your mailserver's IP address is now different from your domain's main A record.