$linuxjunkies
>

CNAME

also: Canonical Name record

A CNAME (Canonical Name) record is a DNS resource record that maps one domain name to another domain name, creating an alias for your actual hostname.

CNAME records are part of the Domain Name System (DNS) and allow you to point multiple domain names at a single target hostname. When a DNS query encounters a CNAME record, it automatically resolves to the target domain instead.

For example, if you have a web server at web1.example.com, you could create a CNAME record so that www.example.com points to it. Users visiting either domain reach the same server, but the canonical (true) hostname is web1.example.com.

CNAME records are commonly used for load balancing, CDN integration, and simplifying DNS management. However, they cannot be used at the root of a domain (apex) and cannot coexist with other record types like A or MX records for the same hostname.

Related terms