CNAME record

A CNAME resource record (CNAME RR) is provided in the domain name system to map a domain another name. The abbreviation " CNAME " is ( recognized canonical =, so called the primary, quasi real name ) for canonical name.

In the simplest case defined by a CNAME resource record another domain name ( "Alias" ) refers to the domain name part in an A resource record (or a AAAA resource record ). The Resource Record in turn then connects the original domain name with an IP address. When changing an IP address, hence the resource record only needs to be changed and all aliases defined by CNAME RR also refer to the new IP address. In return, the name resolution via the CNAME RR is more complex.

CNAME resource records are defined in the Internet Standards RFC 1034 and RFC 1035, 1987 and 1997 clarified in RFC 2181 again, because this effect performance requirements of the standards were ignored.

The notion of canonical name has been widely interpreted as a limitation of having to specify a finally official name. This in turn was derived, more names are likely to be only those of CNAME resource records, on the other CNAME resource records but not likely to refer. In fact, however, meant that it must not be the name of another resource records, but that the name can be recognized even somewhere outside the Domain Name System.

An NS resource record, MX resource record or PTR resource record must not reference a CNAME resource record. Conversely must be accessible only via a CNAME resource record a PTR resource record but quite. The name of a CNAME resource records should not be used as the name of any other resource records, as it is representative of all resource records of the target. The only exception to this is the Domain Name System Security Extensions.

Syntax

IN CNAME Examples

The following simple example, a domain name with an A record created first with an IP address and then with a CNAME RR in these CNAME referenced (the term " CNAME " refers confusingly, on the right side of CNAME RR, it denotes the actual and original name of the domain and does not denote the left part, so the "Alias", however, are often mistakenly referred to as alias " CNAME " ):

Www.example.com. IN A 192.0.2.42         www.example.net. IN CNAME www.example.com. Several CNAME resource records can reference the same target, but also be nested:

Www.example.com. IN A 192.0.2.42         www.example.org. IN A 192.0.2.42         www.example.net. IN CNAME www.example.com.         en.example.net. IN CNAME www.example.net.         de.example.net. IN CNAME www.example.net. name resolution

When a name server receives a request for which a CNAME RR exists, it dissolves as possible to the IP address. In the example, the name server, of course, recognizes that www.example.com is not yet the desired response to the request to be www.example.net.

If the answer is in addition to the IP address and the canonical name is passed. The client can detect so that his original request was based on an alias.

A nslookup on Windows would give the following answer:

C: \> nslookup www.example.net         Name: www.example.com         Address: 192.0.2.42         Aliases: www.example.net On Unix systems, the output of the program would host the following:

$ Host www.example.net        www.example.net is an alias for www.example.com.        www.example.com has address 192.0.2.42 It can happen, of course, that a name server can not resolve to the IP address. In this case, it returns only the CNAME. The client must then attempt to resolve the name to other path.

Limitations

Allowed for an alias in a CNAME record no further RR ( A record, MX record, etc. ) are set.

Do not:

Example.com. CNAME somedomain.example.      example.com. A 192.0.2.42 Permitted however, because different names:

Example.com. A 192.0.2.42      www.example.com. CNAME example.com. References

  • Resource Record
161794
de