|
Canonical Name records (CNAMEs) act as aliases for the hostnames
they are attached to. CNAMEs take on the web setting and MX record
of their assigned hostname.
What are the advantages of CNAMEs?
CNAMEs are great timesavers. Instead of having to create multiple
hostnames that contain the same information, you can create one
hostname and then create and attach multiple CNAMEs to that hostname.
Let's say you want to create a number of hostnames with the same
web presence as www.my-example.com. Instead of creating separate
hostnames and setting up a web presence for each, you can create
CNAMEs for my-example.com and attach them to the www.my-example.com
hostname. Any changes you make to the www hostname will automatically
change all the attached CNAMEs accordingly. This saves you the
trouble of modifying many hostnames individually if, for example,
your website address changed.
Do CNAMEs have to be attached to hostnames within the same domain?
CNAMEs can be attached to hostnames within the same domain but
they don't have to be. For example, you can create the CNAME
cname1.my-example.com and attach it to a hostname created from
the same my-example.com domain: www.my-example.com. However,
you can also create the CNAME cname2.my-example.com and attach
it to a hostname of another domain such as www.mydomain.com or
any other hostname on the Internet.
In each of these cases the CNAME that is created will act exactly
like the hostname it is attached to. When entered as a website
address the CNAME will direct visitors to the website address set
for the hostname. And if there is an MX record set for the hostname,
then email addressed to the CNAME will be delivered to the same
mail server set for the hostname.
|