What is a CNAME?

Marijn Avatar

Publication date

Table of contents

A CNAME, also known as a “Canonical Name record” is a type of DNS (Domain Name System) record used to assign a name to a domain name. Within a so-called “DNS zone” of a specific IP address, there are multiple names present that contain A records.

A CNAME record points a specific domain name to another domain name. An A record, on the other hand, points to an IP address. The A record and CNAME record are connected. This connection lies in the fact that the hostname to which the CNAME record points is translated to the correct IP address via an A record. 

CNAMEs are often used to point different subdomains to the same main site without having to manage the IP addresses individually.

How is the CNAME record used?

www to main domain:

  1. Suppose your main domain is your-domain.nl, and you want www.your-domain.nl to also point to this site. You can set a CNAME record so that www.your-domain.nl points to your-domain.nl.
  2. Subdomains to main domain:
    • If you have subdomains like blog.your-domain.nl or shop.your-domain.nl, you can use a CNAME record to point those subdomains to your main domain.

Example of a CNAME record:

NameTypeValue
wwwCNAME       your-domain.nl.
blogCNAME       your-domain.nl.



Limitations of CNAME records

CNAME records are, as mentioned earlier, specifically aimed at certain tasks. Yet, there are several limitations to the CNAME record. For example, it cannot be used on the root domain. This is because it conflicts with other DNS records like MX records for email.

Complexity can also be an issue. Excessive use of CNAME records can make certain DNS configurations more complicated, making them harder to manage. This negates the essence of CNAME records, as they are primarily about simple, centralized management.

In short, a CNAME record is a valuable and flexible way to manage and redirect domain names, but it should be used carefully to prevent potential issues.

Domeinnaam bestellen?

Een goede naam zorgt voor een goede website.


Published on

in

comments

Leave a Reply

Your email address will not be published. Required fields are marked *