Published on

What is a CNAME record?

Authors
  • avatar
    Name
    Skip2 Networks
    Title
    Content Manager
    Twitter

CNAME

What is a CNAME record?

A CNAME (Canonical Name) record is a type of DNS record that creates an alias by pointing one domain name to another domain name rather than directly to an IP address. Think of it as a forwarding address that tells the DNS system "when someone asks for this domain, give them the same answer you'd give for that other domain." CNAME records are particularly useful for managing subdomains, creating memorable aliases for complex server names, and maintaining flexibility in DNS configurations without requiring multiple A records that point to the same destination.

CNAME records play a crucial role in CDN implementations and modern web architecture. When organizations deploy CDNs, they typically receive a CDN-specific hostname like "my-site.cdn.skip2.net" that points to their distributed edge servers. Rather than asking users to remember this technical hostname, companies create CNAME records that map user-friendly subdomains like "cdn.company.com" or "assets.company.com" to the CDN provider's hostname. This approach allows seamless CDN integration while maintaining brand consistency and providing the flexibility to change CDN providers without updating hardcoded references throughout applications.

CNAME Record Example

A media company wants to serve images and videos through a CDN while keeping their branding intact. Their CDN provider assigns them the hostname "my-site.cdn.skip2.net" for content delivery. Instead of embedding this technical URL throughout their website, they create a CNAME record that points "media.company.com" to "my-site.cdn.skip2.net". Now their website can reference images using the branded URL "https://media.company.com/logo.png", which automatically resolves to the CDN's optimized delivery network.

CNAME Record Structure

ComponentExample ValuePurpose
Namemedia.company.comThe alias domain being created
TypeCNAMESpecifies this is a canonical name record
Valuemy-site.cdn.skip2.netThe target domain to point to
TTL3600How long DNS resolvers should cache this record

Common CNAME Use Cases

  • CDN Integration - Point asset subdomains to CDN hostnames
  • Service Aliases - Create memorable names for third-party services
  • Load Balancer References - Abstract underlying infrastructure changes
  • Subdomain Management - Organize different services under branded domains
  • A/B Testing - Switch traffic between different implementations

CNAME Limitations

  • Cannot be used for root domains (apex domains)
  • Cannot coexist with other record types for the same name
  • Creates additional DNS lookup overhead
  • Some email services may not work properly with CNAME records

Learn more

Explore the entire CDN Glossary

Skip2 CDN Glossary

Sign up for our newsletter

Get Started