A records versus CNAME records in the cPanel Zone Editor

Operating System & Version
linux
cPanel & WHM Version
100.0 (build 8)

FrankNY

Registered
Feb 3, 2022
3
1
1
New York, NY
cPanel Access Level
Website Owner
Environment:
linux operating system
shared hosting
dedicated IP address
cPanel 100.0.8

This question pertains to the choice between the use of A records versus CNAME records in the cPanel Zone Editor.

Given the choice between...

Name=example.com. TTL=14400 Type=A Record=93.184.216.34
Name=cpanel.example.com. TTL=14400 Type=CNAME Record=example.com
Name=cpcalendars.example.com. TTL=14400 Type=CNAME Record=example.com
Name=cpcontacts.example.com. TTL=14400 Type=CNAME Record=example.com
Name=ftp.example.com. TTL=14400 Type=CNAME Record=example.com
Name=mail.example.com. TTL=14400 Type=CNAME Record=example.com
Name=webdisk.example.com. TTL=14400 Type=CNAME Record=example.com
Name=webmail.example.com. TTL=14400 Type=CNAME Record=example.com
Name=whm.example.com. TTL=14400 Type=CNAME Record=example.com
Name=www.example.com. TTL=14400 Type=CNAME Record=example.com

and...

Name=example.com. TTL=14400 Type=A Record=93.184.216.34
Name=cpanel.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=cpcalendars.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=cpcontacts.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=ftp.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=mail.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=webdisk.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=webmail.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=whm.example.com. TTL=14400 Type=A Record=93.184.216.34
Name=www.example.com. TTL=14400 Type=A Record=93.184.216.34

...which, if either, is more correct?

The first example uses an A record that points to the (dedicated) IP address of the primary domain name and uses CNAME records that point to the primary domain name for all of the other names.

The second example uses A records that point to the (dedicated) IP address of the primary domain name for all names.

Can anyone advise me as to what constitutes "best practice" in this situation?

Is it one of the above choices or perhaps some mixture of the two?

Thanks very much to anyone who can shed some light on this for me.
 

quietFinn

Well-Known Member
Feb 4, 2006
2,041
551
493
Finland
cPanel Access Level
Root Administrator
The only difference is really that when you use a CNAME record it means that there is an additional request sent to the DNS servers, which can cause a delay of a few milliseconds.

Maybe worth to notice that MX or NS (nameserver) records may never point to a CNAME record, only A records.
 
Last edited:

FrankNY

Registered
Feb 3, 2022
3
1
1
New York, NY
cPanel Access Level
Website Owner
Thank you quietFinn for your response to my question. I was aware that there might be an extra request when using a CNAME record instead of an A record. That's not particularly a concern due to the very low traffic to the site, although I have read arguments over on Stack Exchange / Stack Overflow claiming that the requests are grouped together and that there's therefore no extra request being made, but I didn't get involved in that argument.
 

FrankNY

Registered
Feb 3, 2022
3
1
1
New York, NY
cPanel Access Level
Website Owner
Thank you also cPRex for your reply. Perhaps things are different when initially setting up a domain, but I used the 'Reset DNS Zone' function in the cPanel Zone Editor just to see what would happen and the result was that the
ftp.
mail.
www.
records were created as CNAME records.

and that the
cpanel.
cpcalendars.
cpcontacts.
webdisk.
webmail.
whm.
records were created as A records.

I left it that way and manually setup two other domains for which I'm responsible the same way - with the three CNAME records and the six A records. Everything appears to be working just fine since the changes were made, so I'm not going to touch it again unless needed.
 
Last edited:
  • Like
Reactions: cPRex