Have a Question?

If you have any question you can ask below or enter what you are looking for!

CNAME Record

CNAME Record (Canonical Name Record)
These are usually referred to as alias records since they usually map an alias to its canonical name. The name server does handle these queries differently from an A record. When a name server looks up a name and finds a CNAME record, it replaces the name with the canonical name and looks up the new name. This allows you to point multiple systems to one IP without specifically assigning an A record to each host name. If your IP was ever to change you would only have to change one A record.

Name: This will be the host for your domain which is actually a computer within your domain. Your domain name is automatically appended to your name. If you are trying to make a record for the system www.example.com. Then all you enter in the textbox for the name value is www.

Alias to:This is the system that your host (that your name value defines) will point to. This value should always be an A record. This should not be a CNAME record as an alias to an alias is not correct. Your domain name is automatically appended to your value (if it does not end it a dot). If you are trying to make an alias to mail.example.com.. Then all you enter in the textbox for the Data value is mail.

TTL: The TTL (Time to Live) is the amount of time your record will stay in cache on systems requesting your record (resolving nameservers, browsers, etc.). The TTL is set in seconds, so 60 is one minute, 1800 is 30 minutes, etc..

Systems that have a static IP should usually have a TTL of 1800 or higher. Systems that have a dynamic IP should usually have a TTL of 1800 of less.

The lower the TTL the more often a client will need to query the name servers for your host’s (record’s) IP address this will result in higher query traffic for your domain name. Where as a very high TTL can cause downtime when you need to switch your IPs quickly.

Best Practice Tip
If you plan on changing your IP you should set your TTL to a low value a few hours before you make the change. This way you won’t have any downtime during the change. Once your IP is changed you can always raise your TTL to a higher value again.

Example 1 – CNAME to record within the same domain:

NAME TTL TYPE DATA
www.example.com. 1800 A 192.168.1.2
ftp.example.com. 1800 CNAME www.example.com

Configuration:

1

2

A record:   For the A record configuration explanation please read more in the A – Data Entry page.

CNAME record details:

  • Name: ftp.example.com. is the host which are we are making an alias for.  In the data entry screen we only enter ftp.
  • Alias to: www.example.com. is the host which ftp.example.com. is an alias to. It is important to realize that this value is never a CNAME value. This value should primarily be an A record.  Since this is a CNAME to a record in the same domain you just need to enter ftp.
  • TTL (time to live):  The 1800 indicates how often (in seconds) that this record will exist (will be cached) in other systems.
  • The end result of this record is that ftp.example.com. is an alias to www.example.com. which points to the IP 192.168.1.2.

 

Example 2 –  CNAME to record apex / root record in the same domain:

NAME TTL TYPE DATA
example.com. 1800 A 192.168.1.2
www.example.com. 1800 CNAME www.example.com.

Configuration:

3

4

 

A record:   For the A record configuration explanation please read more in the A – Data Entry page.

CNAME record details:

  • Name: www.example.com. is the host which are we are making an alias for.  In the data entry screen we only enter www.
  • Alias to: example.com. is the host which www.example.com. is an alias to. It is important to realize that this value is never a CNAME value. This value should primarily be an A record.
  • TTL (time to live): The 1800 indicates how often (in seconds) that this record will exist (will be cached) in other systems.
  • The end result of this record is that www.example.com. is an alias to example.com. which points to the IP 192.168.1.2.

 

Example 3 –  CNAME to record to a different domain:

NAME TTL TYPE DATA
example.com. 1800 CNAME www.example100.com.

Configuration:

5

A record:   For the A record configuration explanation please read more in the A – Data Entry page.

CNAME record details:

  • Name: www.example.com. is the host which are we are making an alias for.  In the data entry screen we only enter www.
  • Alias to: www.example100.com. is the host which www.example.com. is an alias to. It is important to realize that this value is never a CNAME value. This value should primarily be an A record.  Since this is a record outside the domain then you would enter www.example100.com. (make sure you end your value with a dot).
  • TTL (time to live):  The 1800 indicates how often (in seconds) that this record will exist (will be cached) in other systems.