Support

CNAME records

A CNAME record or Canonical Name record is a type of resource record in the Domain Name System (DNS) that specifies that the domain name is an alias of another, canonical domain name.

Usage of CNAME-records

Using CNAMEs makes your DNS data easier to manage.  CNAME-records point back to an A record. So if you change the IP address of the A record, all your CNAME records pointed to that record automatically follow the new IP of the A record. The alternative solution is to have multiple A records, but then you would have multiple places to change the IP address which increases the chances of error.

The most popular use of the CNAME-record, is to provide access to a web server using both the standard www.domain.com and domain.com (without the www). This is usually done by adding a CNAME-record for the www name pointing to the short name [while creating an A Record for the short name (without www)].

Example

You have a website with the domain name mywebsite.nl. This domain name is hooked up to an A-record which translates the domain name to the appropriate IP address, f.i. 11.22.33.444.

You also have several subdomains, like www.mywebsite.nl, ftp.mywebsite.nl, mail.mywebsite.nl etc. and you want this sub domains to point to your main domain name mywebsite.nl. In stead of creating A-records for each sub domain and binding it to the IP address of your domain, you create an alias, a CNAME-record. See the table below, in case your IP address changes, you only have to edit 1 A-record and all subdomains follow automatically because de CNAMES point to the main domain with the A-record.

 

(Sub)domain
Type
Target
mywebsite.nl
A
11.22.33.444
www.mywebsite.nl
CNAME
mywebsite.nl
ftp.mywebsite.nl
CNAME
mywebsite.nl
mail.mywebsite.nl
CNAME
mywebsite.nl

 

More possibilities

 

  • The wildcard
    To point all your subdomains to your main domain you can use the wildcard in the CNAME-record, like *.mywebsite.nl . All subdomains will automatically redirect to your main domain. Please bare in mind that each separately configured subdomain (either with an A-record or a CNAME-record)  has priority over the wildcard configuration.
     
  • Product and brand names
    In case you have registered several domain names, for example for your different products or brand names and you want to redirect  them all to your main domain, you create CNAME-records for all these other domains.  F.i. myproduct.nl > mywebsite.nl.
     
  • Domains with different TLDs
    In case you registered your domain name in several countries and you want to redirect them all to your main domain, you create CNAME-records for your other domain extensions. F.i.  mywebsite.be or mywebsite.com > mywebsite.nl
     
  • External domain
    You can also use a CNAME-record to redirect one of your domain names to en external domain, that is a domain you do not own yourself.  F.i. provider.mywebsite.nl > networking4all.com 

 

(Sub)domain
Type
Target
mywebsite.nl
A
11.22.33.444
*.mywebsite.nl
CNAME
mywebsite.nl
myproduct.nl
CNAME
mywebsite.nl
mywebsite.be
CNAME
mywebsite.nl
CNAME
mywebsite.nl
provider.mywebsite.nl
CNAME
networking4all.com

 

DNS server resolves the domain names

Assuming you have the subdomain provider.mywebsite.nl which points to networking4all.com

  1. When a visitor goes to provider.mywebsite.nl, the DNS server will find the CNAME-record networking4all.com. 
  2. The DNS server will look up the new name networking4all.com
  3. The A-record for networking4all.com provides the corresponding IP-asdress.
  4. The visitor arrives at networking4all.com

Limitations:

  • The extra lookup for the CNAME > New Name > IP-address, delays the process with a few extra milliseconds 
  • You can not create a CNAME-record for the main domain name (mywebsite.nl) itself, this must be an A-record 
  • MX- or NS-records may never point to a CNAME record.

Create your own CNAME-records

To create your own CNAME records follow this link: Create CNAME-records with the Control Panel.