Editing CNAME and A Records

A DNS Zone File is a list of all your DNS records, which are used by DNS servers to direct your website traffic and emails to your hosting server, as well as any other services you have set up. Needless to say, your zone file is vital to the operation of your web services.


When you purchase a new cPanel web hosting service, or add a domain to an existing service, cPanel will create a zone file for you using information on the server. While, in most instances, this should work fine for you, there are situations where you may need to edit your zone file. Here is a guide on how to modify your Zone File.


Editing your Zone File


In order to access your Zone File editor, you will first need to log into your cPanel. You can find a guide on logging into your cPanel here. Once you are logged in, scroll down to the Domain section and click on the DNS Zone File Editor.


You will now see a list of all your domains that are set up in this cPanel instance. Click on the Manage button next to the domain you wish to update. You will now see a list of all your domain DNS records.


Adding a DNS record


To add a record, you can click on the Add Record button on the right-hand side of this screen. You can also click on the drop down menu on this button to choose the type of record you wish to add.


Once you click the button, you will see the fields required for that record type (see below for information on record types). Once you enter your information, be sure to click on Save Record to update the zone file.


Editing a DNS record


You can search for the record you are looking to edit using the search box on the left-hand side, or you can filter your records by type using the Filter options below the search box.


Once you have the record you need to edit, click on the Edit button to the right of the record. You will now be able to edit any of the fields for the record, even the record type. What fields are present depends on the record type (see below for record types). Be sure to click Save Record once you are done to update the zone file.


Deleting Records


You can delete a DNS record simply by clicking on the Delete button next to the DNS record you wish to remove. This action is not reversible, so be certain that you need to remove the record before proceeding.


Record Types


There are several different types of DNS records that you will see in your zone file. While they are have their own purposes, some are much more common than others.


Note: When entering the name of the record, the tailing "." is important. If you do not end the entry with a period, cPanel will add the domain to the record.



will be saved as



will be saved as



will be saved as



will be saved as



will be saved as



Common Records


A records

  • A records direct a domain or subdomain to an IP address.
  • This is the final destination of the DNS lookup.
  • Every zone file must contain at least one blank A record (sometimes denoted by a "@") to be considered valid
    • example.com.

      IN A


      IN A


CNAME records

  • CNAME records direct a domain or subdomain to a fully qualified domain name (FQDN)
  • CNAME records are used to redirect traffic to other FQDN
  • You can set several of your subdomains to redirect to your main domain name, which can be convenient if you ever need to update your IP address
    • ftp.example.com.

      IN CNAME



      IN CNAME



TXT records

  • TXT records contain a string of characters that is used for many domain based services, such as domain ownership and SSL certificate verification.
  • They are also used for SPF, DKIM and DMARC email verifications.
  • They can contain any string up to 255 characters.
    • example.com.

      IN TXT

      "v=spf1 a mx include:relay.mailchannels.net ~all"


      IN TXT



MX records

  • MX records (or Mail eXchange) are used to direct email to your mail server.
  • They include a priority and a destination that must be a FQDN (not an IP address)
  • Typically, there are several MX records for a domain for redundancy reasons.
  • Mail servers will first try the server with the smallest number for priority and then proceed from there until it succeeds with sending the email
    • example.com.

      IN MX




      In MX



    • in this example, mail servers will attempt to send the email to example.com first, and only send to relay.example.com if it fails at example.com


Uncommon Records


AAAA records

AAAA records are essentially the same as A records, except instead of pointing to a IPv4 address (most IPs that you will see), it points to a IPv6 address. While not very common these days, eventually you will start to see more IPv6s as the supply of IPv4 runs out.


CAA records

CAA records point to a Certificate Authority Authorization and are used to specify which Certificate Authority (CA) is permitted to issue certificates for your domain. This is an advanced feature and it is unlikely that you will need to add this type of record, but if you do, your CA should be able to supply the information needed.


SRV records

SRV records are used to point web traffic to particular ports on the server. This is typically used for custom web applications that are beyond the scope of this guide. As is the case for CAA records, your software author should be able to provide you with the information required.




Note: Any time that you make any changes to your DNS (including nameserver updates), it will take time for the changes to propagate worldwide. While we advise that it can take up to twenty-four hours for records to fully propagate, the process typically completes in four to six.


Did this answer your question? If not, please let us know what issues you're having by submitting a ticket.




  • Domains, DNS, zone file, records
  • 19 Users Found This Useful
Was this answer helpful?

Related Articles

Unlock your domain name for transfer

As a security measure, domains can be locked against being transferred. This help protects you...

Change the contact details listed with your domain

It is vital that your domain contact information is kept up to date at all times. Not only...

Changing Nameservers for Your Domain Name

Your domain Nameservers are an important part of your web hosting service. It directs...

Changing the nameservers on a domain registered through MacHighway

When you register a domain with MacHighway, your nameservers are set to our name servers by...