A CNAME Record can be used to link one domain name to another. CNAME stands for Canonical Name.
A common example is to have example.com and www.example.com that points to the same application and is hosted by the same server. To avoid maintaining two different records, it is common to create the following:
- An A record for Example.com pointing to the Server IP Address
- A CNAME record for www.example.com, pointing to example.com
The result from this is that example.com points to the server IP address, and www.example.com points to the same address via example.com. Should the IP address change, you only need to update it in one place: just edit the A record for example.com, and www.example.com automatically inherits the changes.
CNAME Restrictions
- A CNAME record must always point to another domain name and never directly to an IP address.
- A CNAME record cannot co=exit with another record for the same name. It's not possible to have both a CNAME and a TXT file for www.example.com
- A CNAME can point to another CNAME, although this is generally not reccomended because of performance reasons. When applicable the CNAME should point as closely as possible to the target name in order to avoid unnecessary performance overheads.
Comments
0 comments
Article is closed for comments.