Manage domain

Buy domain

CloudfloorDNS Knowledgebase

home ->

DNS Tips

Search the knowledgebase  


Article ID : # Last review : 2007-02-02 22:38:00

How to use CNAME records


CNAME dns records are an important and very useful time saving dns type. CNAME records can be considered an alias. For example. If you have 2 domain names and and always want to point to, you can CNAME to This way you only ever have to maintain the IP address of the record. If you change it, the record will always change automatically.

A great use of this is where a single web site hosts multiple web sites. Each site is probably There are probably may sites pointing to the same server IP. Should this IP ever change it would be necessary to change all the 'www' records for all the domains. If you however CNAME the www records to one master domain, then you only have to change that master domain www record for all the others to change automatically. This is a fantastic time saver, especially if you don't control the dns for some of those domains.

Much easier to manage than specifying each A record in each domain individually.

Causes 1 extra DNS lookup. One lookup needs to be made for the CNAME, then one for the A record it is CNAMEd to. In reality this is probably only 150ms or so, but it could be an extra performance hit on very busy sites. Microtech DNS servers automatically get around this by looking up the A record internally as long as both domains are hosted on our servers and only serving the A record, thus saving the extra record and improving performance.

It can be worth setting the TTL on CNAME records slightly higher than other records as they are less likely to change. Even if the A record changes, the CNAME will still be pointing to the same place.

Cannot be used with MX records. Do not point an MX record to a CNAME.

Do not CNAME the host domain, i.e. CNAME is OK for host records such as 'www', but do not cname the actual domain itself. If you require your Root or Naked domain (also known as the Zone Apex) pointed to a CNAME, you can see use the ALIAS record type. See the KB article on using the ALIAS record



So that we can improve our search results, please let us know, did this help you? YES | NO

Please note that all articles are the property of Microtech Limited and must not be re-produced without express written permission

Subscribe to kb news feed