What is a DNS CNAME (Canonical Name) ?

Card Puncher Data Processing

About

A CNAME (Canonical Name) is a type of DNS record that maps one domain name to another name.

It brings a Domain Name Alias functionality (synonym).

It's also known as an alias record.

When a DNS resolver encounters a CNAME record:

  • it will query the server again using the result of the CNAME as input
  • until it found an IP.

You can achieve the same alias functionality with the alias record but faster because there is only one query needed.

Unicity

CNAMEs are, according to DNS standards, meant to be the only record in a host's DNS records. Therefore, no other record type can be set with the same name.

It means that you shouldn't create a CNAME for your apex domain because the apex domain is generally also set:

  • in the MX record in order to receive email
  • or other validation TXT records (SPF, …)

Example

On the below domain data, we see:

NAME                    TYPE   VALUE
--------------------------------------------------
bar.example.com.        CNAME  foo.example.com.
foo.example.com.        A      192.0.2.23

When a DNS query is performed against bar.example.com, the resolver:

  • will get a CNAME record with the value foo.example.com
  • will query the domain table again with the value foo.example.com and get an A record
  • and will return the IP 192.0.2.23

SEO

To redirect to a name to a server (known as a custom domain), you may use:

  • a CNAME
  • or a A or AAAA record , (directly linked to the IP addresses)

By using a CNAME, the server is not considered as a 1st party server by search engine 1). The script and cookies could be considered as third-party.

Usage

Specification

DNS CNAME records are specified in search/rfc_search_detail.php and clarified in Section 10 of RFC 2181.

2)





Discover More
Ezoic Cloudflare Dns
Advertising - Ezoic Ad Platform (Ez)

Ezoic is an ad platform. a minimum of 10,000 visits per month (not really) More ... ...
Card Puncher Data Processing
DNS - Record

A DNS record is a row in a DNS database. A record is a text line. name is the name or IP address for a ptr record ttl is the the time to live in the cache class is the network class being used....
Card Puncher Data Processing
DNS Alias record

An alias is a DNS record with a name that resolves directly to an ip_address. cnamenamenamean ip addressDNS resolverroundtripip_addressCNAME Before creating an ALIAS record, check there are no: ...
Card Puncher Data Processing
DNS Database

The DNS database is the DNS repository that contains all DNS record of a domain The domain provider should have a graphical interface to modify records but at the end, this record are stored in a...
Card Puncher Data Processing
Domain Name

The term domain name is used to refer to the name of a node in the domain namespace that identifies an object. A domain name is a succession of one or more label separated by dots (known alas as the...



Share this page:
Follow us:
Task Runner