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 184.108.40.206
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.
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 220.127.116.11
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 18.104.22.168. This means that email meant for email@example.com will be routed to the email server at 22.214.171.124. 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.