How do I manipulate records in cPanel's DNS zone?

Procédure

Introduction to the cPanel DNS Zone Editor

The Zone Editor tool available on your cPanel interface allows you to manage DNS zones and the DNS records within them. These DNS records are only effective when your domain name uses the DNS servers of your cPanel package.

If your domain name uses another DNS server such as Cloudflare's DNS servers, you will need to edit the DNS zone and DNS records using the tools provided by your DNS provider (in Cloudflare's example: Cloudflare's DNS administration space).

How do I manipulate records in cPanel's DNS zone?

Zone Editor lets you manipulate the following types of DNS records:

  • Type A: used to associate a host name with an IPv4 address
  • Type AAAA: used to associate a host name with an IPv6 address
  • CAA type: used to list the certification authorities authorised to issue SSL certificates for the domain name (mainly useful whenusing a paid SSL certificate)
  • CNAME type: used to associate a host name with another host name
  • MX type: used to specify the email servers that manage the domain name
  • SRV type: used to specify a host and port for specific services
  • Type TXT: used to specify arbitrary textual content (used, for example, for the SPF and DKIM mechanism, or for verifying domain name ownership by third-party services such as Sendinblue or Google Webmaster Tools).

These are the main types of DNS records that you may need to modify to suit your needs.

How to manage DNS records for a domain name on cPanel

1. Log in to your cPanel account, scroll down the page and click on the " Zone Editor " icon in the " Domains" section (see previous screenshot). Once in the icon, you'll see a list of your DNS zones and the actions you can perform on them:

How do I manipulate records in cPanel's DNS zone?

You could then :

  • Add an A-type DNS record with the "+ A Record" button
  • Add a CNAME DNS record using the "+ CNAME Record" button
  • Add an MX DNS record using the "+ MX Record" button
  • Consult and edit the DNS zone using the "Manage" button.

Given that the first three buttons for adding DNS records do not modify existing DNS records, we recommend that you always use the "Manage " button to check whether a DNS record is already available or not, and whether it needs to be deleted or modified so that it does not conflict with the settings you want to implement. As a result, the use of these buttons will not be covered in this documentation.

By clicking on "Manage", you will see the DNS records available for this DNS zone:

How do I manipulate records in cPanel's DNS zone?

Add a DNS record

To add a DNS record, click on the "Add Record" button on the top right-hand side of the list. A new empty line will appear:

How do I manipulate records in cPanel's DNS zone?

In the first field, you will enter the host name you wish to create. You can either enter just the sub-domain or the full FQDN (Full-Qualified Domain Name). As soon as you leave the box, cPanel will automatically adjust the field to FQDN. So, for example, you could enter "my-subdomain", and cPanel will automatically readjust to "my-subdomain.my-cpanel-formula.com".

The dots at the end of the name indicate that the name is an absolute FQDN. Conversely, the absence of a dot indicates that the FQDN is relative to the DNS zone that hosts it. For example :

  • mydomain.com (without a dot at the end) in the DNS zone mysuperdomain.com will mean mydomain.com.mysuperdomain.com
  • mydomain.com. (with dot at the end) on the DNS zone mysuperdomain.com will mean mydomain.com

This detail needs to be taken into account for both the name and the record, particularly if you are using hostnames (for example a CNAME record).

The TTL field allows you to indicate how long a DNS server should keep your DNS record in its cache system. The larger it is, the more you reduce the possible latencies associated with the DNS protocol. But the smaller it is, the more immediately your changes will take effect. If you don't know what to set, we recommend that you keep the default TTL.

The "Type" field lets you choose the type of DNS record you want to create. The "Record" field may change depending on the type chosen, given the data format (for example, an MX record will require two record fields, a priority and a host name).

The "Record" field allows you to enter the value of your DNS record.

Example: associate the host name sd1.ma-formule-cpanel.com with the IPv4 address 1.2.3.4 :

How do I manipulate records in cPanel's DNS zone?

Once you have entered all the information, click on "Save Record".

Modifying a DNS record

To modify a DNS record, click on the "Modify" button associated with the DNS record you wish to modify:

How do I manipulate records in cPanel's DNS zone?

The line will then turn into a form and you will be able to modify it in the same way as when creating a DNS record.

Deleting a DNS record

To delete a DNS record, click on the "Delete" button associated with the DNS record you wish to delete:

How do I manipulate records in cPanel's DNS zone?

When you click on the button, a confirmation message will be displayed to confirm your request. Click on Continue :

How do I manipulate records in cPanel's DNS zone?

The most common DNS configurations

Alias record (CNAME)

A DNS CNAME record associates a host name with another host name. Example:

If you have a CNAME record subdomain.mydomain.com that points to mydomain.com, then www.monsite.com will have the same DNS value as mydomain.com. If the DNS record(s) associated with monsite. com are modified, subdomain.monsite. com will also be affected by this modification.

MX record

To associate an email server with a domain name, you will need to modify (or add) the MX records. The priority field will indicate the priority of the email servers. When sending an email, the sending email server will look for the email server with the highest priority (0 is the highest priority). It will retry with a lower priority email server if the previous server is unable to receive the email.

DKIM and SPF

DKIM and SPF records are TXT records. A host name should not have several SPF records. If you want to set up an SPF record that satisfies several email servers, you will need to merge their rules onto a single record. Example:

Email server A indicates that it should set the following SPF record: "v=spf1 mx a ip4:1.2.3.4 -all"

Email server B requests the following SPF record: "v=spf1 ip4:4.5.6.7 include:mx.provider.com -all".

Your SPF record should then be: "v=spf1 mx a ip4:1.2.3.4 ip4:4.5.6.7 include:mx.provider.com -all"

DKIM records are TXT DNS records with the hostname "identifier._domainkey.domain.com". If you use several email servers, make sure that the DKIM identifier for each email server is different. You should not have the same identifier twice in your DNS zone.

Rate this article :

1/5 | 2 opinion

This article was useful to you ?

Article utileYes

Article non utileNo

Vous souhaitez nous laisser un commentaire concernant cet article ?

Si cela concerne une erreur dans la documentation ou un manque d'informations, n'hésitez pas à nous en faire part depuis le formulaire.

Pour toute question non liée à cette documentation ou problème technique sur l'un de vos services, contactez le support commercial ou le support technique

MerciMerci ! N'hésitez pas à poser des questions sur nos documentations si vous souhaitez plus d'informations et nous aider à les améliorer.


Vous avez noté 0 étoile(s)

Similar articles

2mn reading

How do I create an additional domain in cPanel?

3mn reading

How to park a domain in cPanel (web redirection)

1mn reading

How do I create a sub-domain in cPanel?

2mn reading

How do I reset the DNS zone for my domain name on cPanel?


Ask the LWS team and its community a question