Custom DNS in cPanel

How do I add a custom DNS record?

  • DNS records can be added from either cPanel or WHM. It is recommended to add domain-related DNS records through cPanel, and only add server-related DNS records through WHM (ie: name server records, hostname records, etc)

To enter DNS records with in cPanel:

1.  Under Domains click on Simple DNS Editor

  • If you have more than one domain added, select the domain for which you wish to create records from the dropdown box
  • If you only have one domain, there will not be a dropbox

2.  Enter under Name what is being directed to through the IP. You can also use a wildcard(*) if necessary. Wildcards will cover anything under the domain such as testing.testingwebsites.com.

cPanel20

3.  Enter the IP address for your record,

cPanel25

4.  And click Add A Record

    • There is also the option below to create canonical (CNAME) records, with a Add a CNAME Record button to submit.

Advanced DNS Zone Editor

DNS (Domain Name Service) is the component of the Internet that converts human-readable domain names (for example, example.com) into computer-readable IP addresses (for example, 123.456.789). DNS uses zone files that reside on your server to map domain names to IP addresses.  There are several different types of records in a domain’s zone file. This feature allows you to create, edit, and delete A, AAAA, CNAME (Canonical Name Record), SRV (Service Record), and TXT (Text Record) records. Enabling or Disabling the Advanced DNS Editor for cPanels in WHM Please ensure the feature list with the “Advanced DNS Zone Editor” option enabled is the same feature list assigned to the package used by the account. You can edit the package to determine which feature list is assigned to it via:  “WHM >> Packages >> Edit a Package”

Log into your WHM dashboard.   Once you are in the WHM, located under the Packages category
WHM-Packages1
look for the Feature Manager tool.
WHM-Feature-Manager
This leads you to a page where you can select the feature template list you want to edit. In this case, there is not one, so we can create one by giving a name to the list we want to create. For example, we name this list Default. Click Add to create the feature template.
WHM-Feature-Manager-2
The new list name will appear under the Edit a Feature List section. Make sure it is selected in the dropdown and click the Edit button. From here you will see a long lost of Features that are offered for accounts with this list. Select or Deselect the checkbox next to the Advanced DNS Zone Editor field. Scroll to the bottom and click on the Save button. This saves your configuration and all accounts that use that configuration will have/ not have the Advanced DNS Zone Editor according to your configuration.
enable_adv_dns_zone

To enter Advanced DNS records with in cPanel:

1.  Under Domains click on Advanced Zone Editor There are 3 differences in the advanced editor from the simple one. Please note that if you are not 100% sure what changes you are making it is always better to use the Simple DNS Zone Editor in order to avoid any major issues with the DNS zone for your domain name and the accessibility of your website.The first difference is the option to completely reset your DNS records to the default ones. Note that this option should not be used in cases you need custom setup for your domain name DNS. It is only safe to use this option if you would like the DNS reset to default.

advanced_dns_zone

To reset the DNS Zone for the chosen domain name click “More”.

Advanced101

To reset your DNS zone files to the defaults that your hosting provider specifies, perform the following steps:

  1. If this account owns more than one domain, select the domain that you wish to manage from the Domain menu.
  2. Click more.
  3. Select the Are you sure that you wish to erase all of your entries and revert to the default state? checkbox.

Advancde22

 Edit a record

To edit a record, perform the following steps:
  1. If this account owns more than one domain, select the domain that you wish to manage from the Domain menu.
  2. Click Edit next to the record that you wish to edit.
  3. Change the information in the text boxes as necessary.
  4. Click Edit Record to save your changes, or click Cancel to discard them.

Delete a record

To delete a record, perform the following steps:

  1. If this account owns more than one domain, select the domain that you wish to manage from the Domain menu.
  2. Click Delete next to the record that you wish to remove.
  3. Click Delete.

To enter DNS records with WHM:

If editing a record to an existing domain/zone

  1. Under DNS Functions

click Edit DNS ZoneSelect your domain name from the list and click the Edit button.In the image above you will see a read out of all the current records listed for the domain newreseller.com as an example. To add new entries for any domain you might be editing DNS records for, you will scroll down the page a little more to see the following image: Here you see the default fields: Name, TTL and then a drop down to select which record you would like to add. Once complete with the information you are adding, you will select Save and the entries will be added to that domain. Email routing will normally stay default to Local Mail Exchanger as this ensures email is routed through the server. Unless you are utilizing 3rd party mail services, only then you will select a different email route such as Remote Mail Exchanger.


cPanel - Setting Up Nameserver

When you have purchased your hosting, you will have to connect your domain with the hosting that you have purchased. If you have purchased the domain and hosting from the same provider, then it is liable that your Nameservers are already setup. If you have purchased your domain and hosting from different providers, then you will have to manually add new Nameservers to your domain, so that it can point your domain to the right server.

Nameservers are a part of Domain Name System. These DNS servers keep the records of which domain is connected to which IP address. Nameservers allow us to use a domain instead of IP address of the DNS server. When a visitor types the URL of your domain then the DNS server tells the browser that from which server it should load content from. In easy words, Nameservers define the current DNS provider of your domain.

When you get the email of the Login details of your web hosting server along with it, you also get the details of your Nameservers. Most hosting providers use their own DNS servers. For setting up your Nameservers, you will have to login to your domain control panel, and update your Nameservers by replacing the old one. Each domain provider has its own application to do so, you will have to refer to your domain registrar’s documentation for further details.

Domain Nameservers take time to propagate through different DNS servers around the globe, the change may reflect instantly or it may take up to 48 hours of time according to the DNS servers of hosting provider.


cPanel - MX Entry

This feature of cPanel allows to route all your emails to a specific server. Changes you make here also get reflected in the domain’s DNS entries. This feature is important to create a backup server for your domain’s mail server to receive when your main server is down. You can setup MX entries here to route your mail to Google mail servers when you use Google Apps to manage your emails.

Use this interface to manage your MX entries and Email Routing

Configure Email Routing

To configure the email routing for your domain, follow these steps −

Step 1 − Open cPanel MX Entries by clicking MX Entry from Email Section of cPanel Interface.

Step 2 − Select the domain for which you want to configure Email Routing.

Step 3 − When you will select the domain from the drop down, Email Routing setting will appear. The current applied setting is displayed bold.

Step 4 − Change your current setting only when you need it. Select any of these four options according to your need.

  • Automatically Detect Configuration − This enables the cPanel to automatically detect the best settings according to priorities of your MX records.
  • Local Mail Exchanger − This enables your server to receive emails, even if any MX entry of higher priority is found. In this case, emails are sent to both domains.
  • Backup Mail Exchanger − In this case, your server acts as backup mail exchanger and if your primary mail exchanger is offline, then it holds the emails until your primary server is back online. You need to have a proper MX Entry for your primary mail exchanger.
  • Remote Mail Exchanger − In this case, your domain does not accept any mail and reroutes them to your primary email server.

Step 5 − Click Change and your new setting will appear in bold letters.

Add an MX Record

To add a, MX record, follow these steps −

Step 1 − Scroll down to Add New Record on MX Entry page.

Step 2 − Enter Priority of MX record, lower the number – higher the priority. Zero has the highest Priority.

Step 3 − Enter Destination Domain to which you want to reroute your emails.

Step 4 − Click Add New Record to add a new MX record.

Edit or Remove an MX Record

To edit or remove click Edit or Remove link in Actions corresponding to the MX entry that you want to edit or delete.

When you will click Edit, it will ask you for the Priority and Domain, change what you need to change and finally click Edit to save the changes.

When you click Remove link, it will ask you for confirmation. Click Delete to remove the entry.


cPanel - Advance Zone Editor

This interface is the advanced version of Simple Zone Editor, which we have gone through in the previous chapter. We can add, edit or delete various types of records here, which are A, AAAA, CNAME (Conical Name Record), SRV(Service Record), TXT (Text Record). We can also configure TTL (Time to Live) with records in this interface.

TTL (Time to Live) indicates the time duration that DNS servers can cache resource records prior to discarding the information.

Reset Zone Files

This option resets every change that you made in your cPanel account regarding DNS records. It also resets the changes made using Simple Zone Editor.

To reset Zone Files, follow these steps −

Step 1 − Navigate to cPanel Advanced Zone Editor by clicking on Advanced Zone Editor link found in Domains Section of cPanel Interface.

Step 2 − Find Reset Zone File and click on more link.

Step 3 − It will show you a warning that all modifications in Zone files will be erased. Select the checkbox for the Are you sure you want to erase all entries and revert to the default state?

Step 4 − Press Reset Zone File button to reset the zone file to their default state. If successful, you will see a success message shown below.

Add an A record

The ‘A’ type of resource records are Host Name records. They contain the IP address of a specific host and map the Domain Name with 32-bit IP address.

To add an A record, follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record ‘Type A’ from Type Dropdown Menu.

Step 3 − Enter Name of your A record. Enter TTL value, if there is no specific need, you can use default which is 14400. Also enter IP address of record in the Address textbox.

Step 4 − Click Add Record to save the record in the DNS entries.

Add an AAAA Record

The AAAA resource records bind hostnames with IPv6 Address, which is a 128-bit IP address.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type from AAAA the dropdown menu.

Step 3 − Enter the Hostname in the Name textbox and TTL value in the TTL textbox, unless required use default TTL value, which is 14400.

Step 4 − Enter 128-bit IPv6 address in IPv6 Address textbox to which you want your hostname to bind.

Step 5 − Click Add Record to save this AAAA record in your DNS entries.

Add a CNAME Record

CNAME records are used to add an Alias to its associated domain name. You can point multiple CNAME records to a single A record so that when the DNS looks up for the Alias, you can simply rename a host, which is defined in Arecords.

To add a CNAME record, please follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type CNAME from dropdown menu.

Step 3 − Enter your Subdomain or Alias to Name text input, also provide TTL value in TTL textbox, unless required use default TTL value, which is 14400.

Step 4 − Enter a valid zone name or domain name to which you want this Alias to point to, in the CNAME textbox.

Step 5 − Press Add Record Button to save this CNAME record to your DNS entries.

Add an SRV Record

This resource record provides information about available services in the specific ports of your server. They associate the location of a service with details on how the service can be contacted on a specific domain. An SRV record must point to a hostname with an A record.

To add an SRV record, please follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type SRV from dropdown menu.

Step 3 − Enter Name of Service and Protocol both preceded by an underscore (_) and separated by dot (.).

Step 4 − Provide TTL value in TTL textbox, unless required use default TTL value, which is 14400.

Step 5 − Provide Priority of the Service, the lower the number in priority, higher is the priority of the service. 0 (zero) has the highest priority.

Step 6 − Enter Weight of the service, it is used by zone administrators to distribute the load to multiple targets. 0 is the lowest load.

Step 7 − Enter the Port on which service is actually offered.

Step 8 − Enter Target, it is the name of the host that will receive this service.

Step 9 − Press Add Record to add this SRV record into your DNS entries.

Add a TXT Record

The TXT records can hold any type of text. A domain name can have many TXT records, most common TXT records are used to define SPF (Sender Policy Framework) or DKIM, which is used for Email Authentication.

To add a TXT record, please follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type TXT from the dropdown menu.

Step 3 − Enter Valid DNS Zone name in Name textbox.

Step 4 − Provide TTL value in TTL textbox, unless required use default TTL value, which is 14400.

Step 5 − Enter TXT Data, it can be any type of text, or a SPF or DKIM data.

Step 6 − Press Add Record Button to add this TXT record to DNS records.

Edit or Delete a DNS Record

To edit or Delete a DNS record, you added earlier. Follow these steps −

Step 1 − Scroll down to Zone File Records in Advanced Zone Editor.

Step 2 − Find the DNS resource record you wish to edit or delete from the list of records.

Step 3 − To Edit an entry, click Edit Link from Action, which is corresponding to the record you wish to edit.

Step 4 − Edit your record according to your need and Click Edit Record button to save the changes.

Step 5 − To delete a record click on Delete link corresponding to the record you wish to delete.

Step 6 − You will be asked for confirmation, press Delete button to delete the record.


cPanel - Advance Zone Editor

This interface is the advanced version of Simple Zone Editor, which we have gone through in the previous chapter. We can add, edit or delete various types of records here, which are A, AAAA, CNAME (Conical Name Record), SRV(Service Record), TXT (Text Record). We can also configure TTL (Time to Live) with records in this interface.

TTL (Time to Live) indicates the time duration that DNS servers can cache resource records prior to discarding the information.

Reset Zone Files

This option resets every change that you made in your cPanel account regarding DNS records. It also resets the changes made using Simple Zone Editor.

To reset Zone Files, follow these steps −

Step 1 − Navigate to cPanel Advanced Zone Editor by clicking on Advanced Zone Editor link found in Domains Section of cPanel Interface.

Step 2 − Find Reset Zone File and click on more link.

Step 3 − It will show you a warning that all modifications in Zone files will be erased. Select the checkbox for the Are you sure you want to erase all entries and revert to the default state?

Step 4 − Press Reset Zone File button to reset the zone file to their default state. If successful, you will see a success message shown below.

Add an A record

The ‘A’ type of resource records are Host Name records. They contain the IP address of a specific host and map the Domain Name with 32-bit IP address.

To add an A record, follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record ‘Type A’ from Type Dropdown Menu.

Step 3 − Enter Name of your A record. Enter TTL value, if there is no specific need, you can use default which is 14400. Also enter IP address of record in the Address textbox.

Step 4 − Click Add Record to save the record in the DNS entries.

Add an AAAA Record

The AAAA resource records bind hostnames with IPv6 Address, which is a 128-bit IP address.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type from AAAA the dropdown menu.

Step 3 − Enter the Hostname in the Name textbox and TTL value in the TTL textbox, unless required use default TTL value, which is 14400.

Step 4 − Enter 128-bit IPv6 address in IPv6 Address textbox to which you want your hostname to bind.

Step 5 − Click Add Record to save this AAAA record in your DNS entries.

Add a CNAME Record

CNAME records are used to add an Alias to its associated domain name. You can point multiple CNAME records to a single A record so that when the DNS looks up for the Alias, you can simply rename a host, which is defined in Arecords.

To add a CNAME record, please follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type CNAME from dropdown menu.

Step 3 − Enter your Subdomain or Alias to Name text input, also provide TTL value in TTL textbox, unless required use default TTL value, which is 14400.

Step 4 − Enter a valid zone name or domain name to which you want this Alias to point to, in the CNAME textbox.

Step 5 − Press Add Record Button to save this CNAME record to your DNS entries.

Add an SRV Record

This resource record provides information about available services in the specific ports of your server. They associate the location of a service with details on how the service can be contacted on a specific domain. An SRV record must point to a hostname with an A record.

To add an SRV record, please follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type SRV from dropdown menu.

Step 3 − Enter Name of Service and Protocol both preceded by an underscore (_) and separated by dot (.).

Step 4 − Provide TTL value in TTL textbox, unless required use default TTL value, which is 14400.

Step 5 − Provide Priority of the Service, the lower the number in priority, higher is the priority of the service. 0 (zero) has the highest priority.

Step 6 − Enter Weight of the service, it is used by zone administrators to distribute the load to multiple targets. 0 is the lowest load.

Step 7 − Enter the Port on which service is actually offered.

Step 8 − Enter Target, it is the name of the host that will receive this service.

Step 9 − Press Add Record to add this SRV record into your DNS entries.

Add a TXT Record

The TXT records can hold any type of text. A domain name can have many TXT records, most common TXT records are used to define SPF (Sender Policy Framework) or DKIM, which is used for Email Authentication.

To add a TXT record, please follow these steps.

Step 1 − Find Add a Record Section in the Advance Zone Editor.

Step 2 − Select Record type TXT from the dropdown menu.

Step 3 − Enter Valid DNS Zone name in Name textbox.

Step 4 − Provide TTL value in TTL textbox, unless required use default TTL value, which is 14400.

Step 5 − Enter TXT Data, it can be any type of text, or a SPF or DKIM data.

Step 6 − Press Add Record Button to add this TXT record to DNS records.

Edit or Delete a DNS Record

To edit or Delete a DNS record, you added earlier. Follow these steps −

Step 1 − Scroll down to Zone File Records in Advanced Zone Editor.

Step 2 − Find the DNS resource record you wish to edit or delete from the list of records.

Step 3 − To Edit an entry, click Edit Link from Action, which is corresponding to the record you wish to edit.

Step 4 − Edit your record according to your need and Click Edit Record button to save the changes.

Step 5 − To delete a record click on Delete link corresponding to the record you wish to delete.

Step 6 − You will be asked for confirmation, press Delete button to delete the record.


cPanel - Simple Zone Editor

DNS (Domain Name System) is a very essential part of Internet System. It simply maps a FQDN (Full Qualified Domain Name), which is in human readable form. For example, www.domain.com to IP address, which are used by computer machine, e.g. 117.18.237.191. For this process, DNS uses zone files that are stored in servers, which contains resource records to map a domain name to an IP address.

In this Simple Zone Editor, we can add two types of records −

Add an A Record

The A types of resource records are Host Name records. They contain the IP address of a specific host, and maps the Domain Name with 32-bit IP address.

To add an A type record, perform the following steps −

Step 1 − Open the Editor by clicking Simple Zone Editor found in Domains Section of cPanel Home.

Step 2 − Find Add an A Record in the Simple Zone Editor interface.

Step 3 − Enter Name in Name textbox and IP address in Address textbox.

Step 4 − Press Add an A Record. If successful, you will get a success message.

Note‘A’ records are essential for accessing your website. They allow DNS servers to locate your website and its services. Without an ‘A’ record, visitors can’t access your website. The cPanel automatically configures A type records for your domain and website, as soon as they are created.

Add a CNAME Record

The CNAME records are used to add an Alias to its associated domain name. You can point multiple CNAME records to a single A record. So that when the DNS looks up for the Alias, you can simply rename a host, which is defined in the A records.

To add a CNAME record, please follow these steps.

Step 1 − Scroll down on Simple Zone Editor to find Add a CNAME Record.

Step 2 − Enter the desired Alias name for CNAME record on Name textbox and Enter a FQDN in CNAME textbox to which you want your Alias pointing to.

Step 3 − Click Add CNAME Record and you should see a success message.

Remove an A or CNAME Record

To remove a user defined A or CNAME Record, please scroll below on Simple Zone Editor to find User–Defined Records. Press the Delete link corresponding to the Record you want to remove.

You should see a success message when record is deleted.


cPanel - Redirect

The redirect interface allows you to send all the visitors or traffic of a Domain or a particular webpage to a new domain. For example, if you moved your website to a new domain and you want to redirect all your visitors to new website, you need to setup redirect. There are two types of redirects available −

Permanent (301) Redirect

This one redirects your visitors to a new website and updates your visitor’s bookmarks. This also directs search engines to your new website. This redirect is permeant and means that page has moved. So, the Search Engine and other crawlers update their data according to the new link. Popularity and SEO of link remains same as the old link had.

Temporary (302) Redirect

This one redirects your visitors to a new website, but does not update your visitor’s bookmark. Search Engines still index your original website. This redirect is temporary and search engine thinks that the new link is going to get removed, hence it does not have same popularity like the old link.

Create a Redirect

To create a redirect, please follow these steps −

Step 1 − Click on Redirects found in Domains section of cPanel Home.

Step 2 − Choose your redirect type from the Dropdown Menu, Permanent or Temporary Redirect.

Step 3 − Choose the Domain Name you want to redirect from the Dropdown menu of lists of domain.

Step 4 − In the next textbox, enter the path of page or path of folder you want to redirect.

Step 5 − Enter full URL of the page your domain will be redirected to, in Redirect to textbox. You will also need to specify the protocol as well, http:// or https://.

Step 6 − Select www. redirection, it determines that if you want your domain to be redirected with www or not. Explanations of options given below.

  • Only redirect with www. − This redirect will be done only if user has entered www. in URL.
  • Redirect with or without www. − This redirect will always be done, does not depends on whether user has entered www. in URL or not.
  • Do not redirect www. − This redirect will not work, if the user has entered www. in URL.

Choose your option accordingly, recommended is that you use Redirect with or without www.

Step 7 − Select Wild Card Redirection checkbox, if you want to redirect all files and folders in sub folder to the same file or folder in new domain. For example, with wildcard redirection www.example.com/pic.jpg will redirect to www.new–example.com/pic.jpg. Without wildcard redirection www.example.com/pic.jpg will redirect to Select the checkbox accordingly.


cPanel - Addon Domain

Addon Domains are addition domains hosted in your account, stored in subfolders. System treats these domains as a subdomain to your system. If you want to run a whole different website under the same hosting plan, you can use this feature of cPanel. It is the best option to run multiple websites on a single cPanel account. For example, you have a hosting for blogging website, and you want a different website for your CV, you will not need to purchase a different hosting account, but you can use the same hosting for your CV website.

To use this feature, you will need to click Addon Domains link under your Domains section from cPanel Home.

In Addon Domains interface, you can do the following tasks.

Create an Addon Domain

To create an Addon Domain, follow these steps −

Step 1 − Find Create an Addon Domain section in Addon Domains, as shown below.

Step 2 − Fill your domain name in New Domain Name textbox.

Step 3 − Subdomains and Document Root will be automatically filled. Then you can leave the setting as it is or you can change them according to your need.

Step 4 − You can create an FTP account, which will be associated with the Addon Domain. To create an FTP account, select the checkbox on which Create an FTP account associated with this domain is written.

Step 5 − Enter FTP Username and Password to create an FTP account.

Step 6 − Click on the button “Add Domain”, if no error occurs, you will get a success message.

Remove an Addon Domain

To remove an Addon Domain, Scroll down to “Modify Addon Domain” Section and press remove link from Actions corresponding to the Addon Domain.


cPanel - Subdomains

Subdomain is a domain, which is a part of a primary domain and exists in the same server. We can also say it is a second website, which resides under the main domain, however it may or may not have any relation with the root website. we can run a new website under this subdomain.

For Example − The blog.tutorialspoint.com is a subdomain for the root domain tutorialspoint.com and blog.tutorialpoint.com can also be accessed by tutorialpoint.com/blog.

To Create a Subdomain

Step 1 − Click Subdomains, which can be found under Domains section.

Step 2 − Enter the Subdomain text you want to create. Select the root Domain for your subdomain and the Document Root will be automatically filled according to your Subdomain. You may leave it as it is or you may change it according to your need. Click Create button to create your Subdomain.

If your subdomain is created successfully, then you will see a Success message like the one shown below.

Managing Redirection

If you want your subdomain to point to another domain rather than loading content from your own server, you can do so by clicking Manage Redirection as shown below.

You will be taken to the screen, where you can manage redirection for your subdomain. Enter the new URL, where you want to redirect your subdomain to. Click save and your redirection will be saved successfully. If you want to disable the redirection later on, you may click Disable Redirection.