A records versus CNAME records in the cPanel Zone Editor
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...
and...
...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.
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.
-
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. 0 -
Hey there! By default, cPanel creates these records with an A record. Neither is really "more correct" - as long as the DNS is properly configured either will get you there. 0 -
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. 0
Please sign in to leave a comment.
Comments
4 comments