CNAME Resource Record


A CNAME resource record is an entry in the Domain Name System, DNS for short. This entry is used to assign a domain to one or more names.

General information

The abbreviation CNAME stands for "Canonical Name" - "Canonical" can be translated as "recognized". It can therefore be said that this refers to the real or recognized name. All host names provided by DynDNS providers can be made accessible with a fixed URL as an entry in the domain name system, despite their dynamic IP address. The user does not notice this.

Finally, the entry is forwarded to the stored name, which functions as an alias for the DNS entries on another domain. However, the use is not completely without restrictions. A CNAME resource record may only be used for subdomains, but not for the actual domain. In addition, all other entries are overwritten by this DNS entry. IP addresses cannot usually be entered as forwarding destinations.

Background

The background for the use of CNAME Resource Record is the fact that the IP address changes constantly when operating an own DSL connection. The solution offers itself in the form of a registration with a DynDNS provider. This forwards requests, such as dyndns.org, to an address with dynamic properties. If the address dyndns.org is now called by a user, the DynDNS service checks which IP address belongs to the domain name and redirects the browser request exactly there.

This is where CNAME Resource Record comes into play, because you want to see your own address in your browser, not the example address dyndns.org. For example, the input field should contain www.example.com without the additional reference to dyndns.org. This can be enabled by CNAME resource record, which defines an alias name for an existing DNS name. The alias name is on the left in the resource record (RR), while the original name is on the right. In DNA terminology, this is also referred to as the "canonical name". Any number of alias names can be defined for this canonical name, but only one alias name can refer to a canonical name.

It is important to know that not every domain service provider allows their own CNAME entries. However, in these cases, it is often possible to configure all name server entries independently.

Examples of possible nameserver entries

Which entries are possible depends on the provider. Here is a selection:

  • A-record
  • CNAME record
  • MX record
  • NS record
  • AAAA record
  • SPF record
  • SRV record.

Adding CNAME Resource Record using Microsoft as an example

Microsoft provides instructions on how to add a CNAME resource record. The following steps are necessary for this at Microsoft:

  1. In DC1, click on "Tools" on the server manager, then on "DNS". This opens the DNS Manager Microsoft Management Console (MMC).
  2. Double-click on "Forward-Lookupzone" in the console structure, then right-click on the mouse to enter the forward lookupzone into which the alias resource entry is to be made.
  3. Now click on "New Alias (CNAME). The Resource Record dialog box appears.
  4. 4. enter the name "Pki" in "Alias name".
  5. If the alias name is "Pki" and the domain has the example name "corp.contoso.com", Microsoft automatically enters the value pki.corp.contoso.com.
  6. Now enter the corresponding FQDN of the web server in fully qualified domain names (FQDN). This can be WEB1, for example, so that the entry is "WEB1.corp.contoso.com".
  7. Click on "Ok" to add the new entry.

How to use CNAME Resource Record

CNAME entries in the DNS are conceivable, for example, if you want to move your domain. If you have booked a web server with a domain from your new provider, you can redirect the traffic of a subdomain from one domain to the other (new) domain. The visitor of the domain sees nothing of the activities in the browser, but they can see both the name and the old subdomain, whereby they do not notice anything about the forwarding. It is also possible to redirect to an external domain. However, this is subject to the consent of the holder concerned.

Significance for Development

A CNAME entry is useful if you have other services with the provider you want to leave, for example, if you want to continue using the mail address. However, in this case, the use of an A-record which can already be found in the above list is sufficient. While the CNAME record redirects the domain or subdomain to a URL, the domain or subdomain is redirected to an IP address using the A-record.

The CNAME entry is not always necessary. If no more services are used with the old provider, the change of the name server for the domain can be considered instead of the Canonical Name Resource Record.