Scale customer reach and grow sales with AskHandle chatbot

What Is a CNAME in DNS?

A Canonical Name (CNAME) record is a DNS entry that maps an alias name to a true or canonical domain name. Instead of pointing a domain directly to an IP address, a CNAME points to another domain name, which eventually resolves to an IP address. This structure functions like a nickname or a forwarding address, ensuring that if the IP address of the main domain changes, all aliases automatically update without needing manual reconfiguration.

image-1
Written by
Published onDecember 17, 2025
RSS Feed for BlogRSS Blog

What Is a CNAME in DNS?

A Canonical Name (CNAME) record is a DNS entry that maps an alias name to a true or "canonical" domain name. Instead of pointing a domain directly to an IP address, a CNAME points to another domain name, which eventually resolves to an IP address. This structure functions like a nickname or a forwarding address, ensuring that if the IP address of the main domain changes, all aliases automatically update without needing manual reconfiguration.

The Role of CNAME in DNS

A CNAME record simplifies domain management by allowing multiple domain names to map to a single source. For example, a website might use www.example.com and blog.example.com, but both can point to the root domain example.com via CNAME records. When a user queries blog.example.com, the DNS resolver sees the CNAME, redirects the query to example.com, and then finds the actual IP address associated with that root domain. This allows administrators to change the IP address of the main server in one place (the A record for the root domain) rather than updating every single subdomain individually.

Restrictions and Limitations

While useful, CNAME records come with specific rules. A domain name that has a CNAME record cannot have any other DNS records (such as MX or TXT records) assigned to it. This restriction means you generally cannot place a CNAME on a root domain (like example.com) because root domains require other record types to function properly. Additionally, CNAME records must always point to another domain name, never directly to an IP address.

Comparison with A Records

The primary alternative to a CNAME is an A Record (Address Record), which maps a domain directly to an IPv4 address.

FeatureCNAME RecordA Record
TargetPoints to another domain namePoints to an IP address
EfficiencyRequires an extra DNS lookupDirect resolution (faster)
Root DomainGenerally not allowed on rootRequired for root domains
FlexibilityUpdates automatically if target IP changesMust be manually updated if IP changes

Common Use Cases

CNAME records are frequently used when integrating third-party services. For instance, platforms like Shopify or Squarespace often ask users to create a CNAME record pointing a subdomain (like shop.yourdomain.com) to their servers. They are also standard for handling the www version of a website, ensuring www.example.com always resolves to the same location as example.com. This setup delegates the management of the destination IP to the service provider, preventing broken links if the provider migrates servers.

CNAMEDNS
Create your AI Agent

Automate customer interactions in just minutes with your own AI Agent.

Featured posts

Subscribe to our newsletter

Achieve more with AI

Enhance your customer experience with an AI Agent today. Easy to set up, it seamlessly integrates into your everyday processes, delivering immediate results.