A CNAME (Canonical Name) record is a type of DNS record that maps an alias domain name to a canonical (true) domain name. When a DNS resolver encounters a CNAME record, it follows the alias to the canonical name and resolves that instead. This mechanism is fundamental to how custom domains work with URL shortening services and CDNs.
For URL shortening, CNAME records enable branded short URLs. A company creates a CNAME record pointing their custom domain (e.g., "go.company.com") to the shortening service's domain (e.g., "custom.shortener.com"). When a user visits "go.company.com/abc," the DNS resolution follows the CNAME to the shortening service, which then handles the redirect. DNS management books on Amazon explain the setup process.
CNAME records have an important limitation: they cannot coexist with other record types at the same name. This means a CNAME cannot be set at the zone apex (e.g., "company.com" without a subdomain). To work around this, some DNS providers offer ALIAS or ANAME records that provide CNAME-like functionality at the zone apex.
When configuring CNAME records for URL shortening, it is important to also set up SSL certificates for the custom domain to enable HTTPS. Many shortening services handle certificate provisioning automatically, but some require manual configuration. Cloud DNS books on Amazon cover these operational details.