What is a CNAME record?
A DNS record that aliases one hostname to another, so the resolver follows the chain to whatever IP the target eventually points to.
A CNAME (Canonical Name) record says "this hostname is just another name for that hostname." When a resolver queries the alias, the DNS server returns the CNAME target, and the resolver follows it, possibly through more CNAMEs, until it finds an A or AAAA record with the actual IP.
CNAMEs are how SaaS products give you a custom domain. You point app.yourbrand.com to a CNAME like cname.vercel-dns.com or proxy.cloudflare.com, and the provider's infrastructure handles the rest, including issuing TLS certificates for your domain.
There's one important rule: a CNAME cannot coexist with other records on the same name, which is why you can't put a CNAME on the apex (root) of a domain in standard DNS. Most providers offer "CNAME flattening" or "ALIAS" records as a workaround.
In the wild
www.example.comCNAME →example.comapp.yourcompany.comCNAME →cname.vercel-dns.comshop.yourbrand.comCNAME →myshop.shopify.com