How do I manage the DNS zones for my domains in cPanel ?
How DNS works
The abbreviation DNS stands for Domain Name System and is used to translate domain names into IP addresses so that two computer systems can communicate with each other. To better understand the role of DNS zones, let's look at the typical process when a visitor accesses your website and how DNS records are processed....
First, the visitor enters your domain name into a web browser. The web browser then attempts to translate your domain name into an address (or IP address) that the computer can understand by querying the DNS service. If your domain name is correctly pointed to a web hosting server by its name servers, the DNS will ask the web hosting server for a small piece of information called a DNS zone. This is a file that stores the DNS records for your domain name. One of these records is called the "A" record and is used to determine the IP address of the server hosting the website for your domain.
Please note that in most cases the server that hosts your domain's DNS zone and the web hosting server that hosts your website are the same server. However, it may happen that a DNS zone is hosted on a different server. Therefore, the DNS zone can be found only on the server that the name servers of your domain point to.
Once you have the IP address, DNS sends it to the visitor's web browser so that it can send a web request for the content of your website. The server behind that IP address then serves the content of your website, completing the communication cycle. Of course, this communication is technically much more complicated, but for the purposes of this tutorial, this explanation should suffice.
As you can see, the DNS service plays a crucial role. Without it, your visitors can't access your website unless they know the IP address of the web server that hosts your website.
Normally, the DNS zone for your Domain names automatically created when your cPanel web hosting account is set up. This means that you can manage the DNS records yourself for each domain name you have added to your cPanel account. In the next lines of this tutorial we will show you how easy it is!
Access to the cPanel zone editor
Now that you know what a DNS zone is, let's take a look at how to access the cPanel feature that allows you to fully manage your DNS zones. First, however, you need to register with the cPanel service. If you are not sure how to do that, we have another Instructions for accessing the cPanel service prepared, which you can view.
After you have logged in to the cPanel service, search in the area Domains According to the function "Zone editor".
If you click on this function, you will be taken to a new page where you can manage all DNS zones for the domains that you have added to your web hosting account with ORC Webhosting.
Add new DNS zone records
Let's start with adding a new DNS zone record. As mentioned earlier, there are several types of DNS records that can exist in a typical DNS zone.
"A" entry: This type of DNS record is used to specify the IP address of the server that hosts the website for your domain name. Changing this record will change the resolution of your domain name to a completely new web hosting server.
"CNAME" entry: This DNS record tells the DNS service that a domain or subdomain should be resolved on the web hosting server where another domain is resolved. For example, the subdomain www always has a DNS entry of type CNAME, which points to the actual domain. DNS reads from this entry that the www subdomain should open the same website as domain.com. This way you always end up on the same website, no matter if you call www.meinedomain.ch or mydomain.ch.
"MX" Record: This type of DNS record is used to indicate where the incoming mail server of a domain name is located. Please note that this entry type accepts only domains or subdomains as values. Another item you must configure for this record type is the priority setting used when multiple MX records are in a single DNS zone. The DNS service always chooses the MX record with the lowest priority when delivering emails.
"TXT" Record: TXT records are used to distinguish the different types of information stored in the DNS. Technically, it is not a type of record, but a structure that contains records such as the host name, port number, and IP address of a domain.
The user interface of the Zone Editor is relatively simple. You will see a single table whose rows represent your domain names and the available actions you can perform with them. For each DNS record type supported by cPanel, there is a separate button that lets you add the record.
Add DNS record A-Record
To add a new DNS record of type A for one of your domain names, please click on the first button "A RECORD" next to the domain name for which you want to add the record.
A new dialog box appears where you need to configure the following options:
Name: Enter the domain or subdomain for this entry here. Normally, you can set up as many subdomains as you like for each domain name. However, you must create a separate Type A entry for each subdomain. If you create your subdomains using cPanel's Subdomains feature, cPanel will automatically create the DNS records for the subdomains for you. However, if you decide to host your subdomain elsewhere, you only need to create the DNS record and point it to the correct address.
Address - in this field, enter the IP address to which your domain or subdomain should point.
Finally, click on the "ADD AN A RECORD" button to successfully create the entry.
NOTICE: It may take up to 24 hours for your Domain DNS propagated to the new entries.
Please note that if you enter only the subdomain and continue filling in the address of the entry, cPanel will automatically add the domain you selected in the name of the entry.
Add CNAME DNS record
To add a new CNAME record, please click on the "CNAME RECORD" button next to the domain name for which you would like to add the record.
cPanel then displays a new dialog box where you must configure your new CNAME record. You must enter the following values.
Name: The name of the entry. Note that this value is usually an actual subdomain, since it makes little sense to configure such an entry for your domain name unless you want to display a different website. For example, if you want the subdomain store.mydomain.ch to display your Shopify store, you must enter the subdomain store.mydomain.ch in the Name field.
CNAME: The domain or subdomain you want your listing to point to. For example, in our example, your Shopify domain should be store.myshopify.com. Note that this is an example. The exact values you will receive from your provider with whom you operate your store, etc.. We also point out that we are not responsible for the Configuration of third-party products no free support will execute.
Then click on the "ADD A CNAME RECORD" button to create your new CNAME DNS record.
In our example, adding this entry type will cause your Shopify store to be displayed in the browser every time you access store.orcwebhosting.ch.
Add MX DNS record
To add a new MX record, click on the "MX RECORD" button next to the domain name for which you want to add a record.
When you click the button, a dialog box appears asking you to enter the required information for the MX record you want to create. As you can see, the following fields must be filled in:
Priority: You must enter a whole number in this field (e.g. 1,2,5,10,100,200). Since your domain has already been added to cPanel, a default record already exists. Therefore, adding a new MX record type automatically means adding a second record. Since the record added by cPanel always has priority 0, it is read first by the DNS service. If the destination of this record does not respond, the next record with the highest priority is considered.
Target: This is the address to which the entry should point. Only a domain or subdomain can be entered in this field, not an IP address.
Once the configuration is complete, click on the "ADD AN MX RECORD" button to save the entry.
These are the most commonly used DNS record types, usually added by users.
How to change or delete a DNS record?
Now that you know how to add DNS records, let's look at how to use the existing DNS records for your Domain name managed. As mentioned above, on the main page of the zone editor, you will see a table with all your domain names and some options regarding the DNS records you have for these domain names. To edit or delete DNS records, click on the "MANAGE" button for the domain name for which you want to view the DNS zone.
cPanel then redirects you to another page where you see a table, but this time the table does not contain your domain names, but all DNS records in the DNS zone for the selected domain name. For each DNS record you will find the following information
Name: The name of the entry. The values here are all valid domains or subdomains.
TTL: Time To Live. This value specifies how long your DNS record is cached by the recursive name server.
Type: The type of the DNS record.
Entry: The value of the DNS record. Depending on the type of record, the value can be either a domain name and IP address, a text value, or an integer value.
Actions: Finally, for each entry there is a series of actions that you can perform - the "EDIT" and "DELETE" actions, which we will explain in the next few lines of this tutorial.
To edit one of the entries in the DNS zone, please click on the "Edit" button for the DNS entry you wish to edit.
Depending on the type of DNS entry, cPanel displays different editing options. You can change the name, type and value of the entry. Once you have made all the changes, please click on the "Save entry" button.
The last action you can take regarding a DNS record is to delete it. Please note that deleting a DNS record removes it permanently from the DNS zone of your domain name. DNS records cannot be restored. The only way to restore a deleted DNS record is to add the record again.
To delete a DNS entry, please click on the "DELETE" button next to the DNS entry you wish to delete.
cPanel will ask you to confirm the deletion. As soon as you click on the "CONTINUE" button, the entry is removed from the DNS zone of the selected domain name.
Managing DNS zones for your domain names in cPanel requires a basic understanding of how DNS works. If you are not sure which DNS actions to perform, please contact our Support, who is very familiar with how DNS works and how to manage the DNS zones for your domains.
Video tutorial
We have also created a video tutorial for you: