cPanel DNS Zone file and Records

What is DNS?

DNS (Domain Name System), is the service which translates between Internet names and Internet addresses. Internet names are the names which we use to refer to hosts on the Internet, such as www.cpanelkb.net. Internet addresses are the numbers which routers use to move traffic across the Internet, such as 187.8.48.65

What is DNS resource records?

DNS records or Zone files are used for mapping URLs to an IPs. These records are located in the DNS server. It connects your website with the outside world. When the URL is typed on the browser it is being forwarded to your DNS servers and then get pointed to webservers.

DNS server configuration file path is /etc/named.conf

Domains DNS zone files available on your cpanel server.

/var/named/domain.com.db

cPanel DNS Zone file and Records

WHM -> DNS Function

The following DNS Records are mostly used in your cpanel.

Address Mapping records (A)

The record A specifies IP address for given host. A records are used for conversion of domain names to corresponding IP addresses.

example.com. IN A 187.8.48.65

IP Version 6 Address records (AAAA)

The record AAAA (also quad-A record) specifies IPv6 address for given host. So it works the same way as the A record and the difference is the type of IP address.

linux aaaa 3ffe:1900:4545:2:02d0:09ff:fef7:6d2c

Canonical Name records (CNAME)

A CNAME record or canonical name record makes one domain name an alias of another. The aliased domain gets all the subdomains and DNS records of the original.

mail 14400 IN CNAME domain.com.
www 14400 IN CNAME domain.com.

Mail exchanger record (MX)

The MX record shows that all emails @ mydomain.com should be routed to the mail server at mydomain.com. The DNS record shows that mydomain.com is located at 26.34.9.14. This means that email meant for test@mydomain.com will be routed to the email server at 26.34.9.14. This finishes the task of the MX record. The email server on that server then takes over, collects the email and then proceeds to distribute it to the user “test”.

mydomain.com. 14400 IN MX 0 mydomain.com.

Name Server records (NS)

An NS record or name server record maps a domain name to a list of DNS servers authoritative for that domain. Delegations depend on NS records.

NS Record Name Server Record which indicates the Authoritative Name Servers for a particular Domain. It should be need atleast two nameservers.

example.com. IN NS ns1.nameserver.com.
example.com. IN NS ns2.nameserver.com.

Reverse-lookup Pointer records (PTR)

As opposed to forward DNS resolution (A and AAAA DNS records), the PTR record is used to look up domain names based on an IP address.

Start of Authority records (SOA)

The record specifies core information about a DNS zone, including the primary name server, the email of the domain administrator, the domain serial number, and several timers relating to refreshing the zone.

Text records (TXT)

The TXT records are custom records which contain machine-readable data. The record is used by Sender Policy Framework (SPF) to prevent fake emails to appear to be sent by you.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

cPanel & WHM Version 74 Now in STABLE

cPanel has released cPanel & WHM Version 74 to the STABLE tier. It includes updates for some...

Installing cpanel on google cloud

Create a new CentOS 7 instance on your google cloud engine. From the cPanel & WHM System...

Install Free SSL Let’s Encrypt plugin in cPanel

Let’s Encrypt is a trusted, open source certificate authority that offers free SSL certificates...

Replace MySQL with Percona in cPanel Server

Percona Server is an enhanced drop-in replacement for MySQL. If you are a web hosting service...

Install nginx as a reverse proxy cPanel plugin

Install Nginx on your cPanel/WHM server using the Engintron cPanel Plugin as a reverse proxy. It...

Powered by WHMCompleteSolution