What is cname
Last updated: April 1, 2026
Key Facts
- CNAME stands for Canonical Name, and it allows a domain to point to another domain instead of directly to an IP address
- CNAME records are commonly used to point subdomains (like www.example.com or blog.example.com) to different hosting services or CDNs
- You cannot create a CNAME record for the root domain (example.com), only for subdomains; use A or AAAA records for the root instead
- CNAME records work by performing DNS lookups on the target domain, so changes to the target domain's IP address automatically reflect for the CNAME
- Email services often use CNAME records to allow users to point their domains to external mail servers without managing direct IP configurations
Understanding CNAME Records
A CNAME (Canonical Name) record is a type of Domain Name System (DNS) resource record that creates an alias for a domain name. Instead of pointing directly to an IP address like A records do, CNAME records point to another domain name. This creates an alias relationship where one domain name becomes an alternative name for another domain.
When a DNS query encounters a CNAME record, it performs an additional DNS lookup on the target domain to find the actual IP address. This means CNAME records provide an indirect routing mechanism in DNS infrastructure, allowing flexibility in domain management.
How CNAME Records Work
When you create a CNAME record, you specify a source domain (typically a subdomain) and a target domain. For example, you might create a CNAME record pointing blog.example.com to blog.example.com.cdn.provider.com. When someone accesses blog.example.com, their DNS resolver follows the CNAME record and looks up the target domain, eventually finding the IP address that provides the content.
This structure allows multiple domains or subdomains to point to the same service without duplicating configuration. If the target domain's IP address changes, all CNAME records pointing to it automatically resolve to the new address, eliminating the need for manual updates.
Common Use Cases
CNAME records are extensively used for Content Delivery Networks (CDNs) like Cloudflare, Akamai, and CloudFront. Websites point subdomains to CDN endpoints using CNAME records, allowing the CDN to serve cached content globally. Email hosting providers use CNAME records to allow users to point their domains to external mail servers. Software-as-a-Service (SaaS) platforms often require customers to create CNAME records pointing to their service, enabling custom domain functionality.
CNAME Limitations and Best Practices
Important limitations include that CNAME records cannot be created for root domains (the bare domain without a subdomain prefix). Only subdomains can have CNAME records; the root domain must use A or AAAA records. Additionally, a single DNS name cannot have both a CNAME record and other record types, preventing mixed configurations.
Best practices include using CNAME records only for subdomains and utilizing them for services that require indirection. Always document CNAME configurations for maintenance purposes, and be cautious of CNAME chains (multiple CNAME records pointing to each other), which can cause delays in DNS resolution.
Related Questions
What is the difference between A record and CNAME record?
A records point directly to an IP address, while CNAME records point to another domain name. A records can be used for root domains; CNAME records cannot. CNAME provides indirection and flexibility for managing multiple domains.
Can I use a CNAME for my root domain?
No, you cannot create a CNAME record for your root domain (example.com). You must use an A or AAAA record for the root. CNAME records are only allowed for subdomains.
How long do CNAME records take to propagate?
CNAME record propagation typically takes 24-48 hours globally as DNS changes spread across internet name servers. Some providers and locations may update faster within a few hours.
More What Is in Daily Life
- What Is a Credit ScoreA credit score is a three-digit number, typically ranging from 300 to 850, that represents your cred…
- What Is CD rates make no sense based on length of time invested. Explain like I'm 5CD (Certificate of Deposit) rates often don't increase with longer lock-up times the way people expe…
- What is a phdA PhD (Doctor of Philosophy) is a doctoral degree earned after completing advanced academic research…
- What is a polymathA polymath is a person with deep knowledge and expertise across multiple different fields or academi…
- What is aarch64ARMv8-A (commonly called ARM64 or AArch64) is a 64-bit processor architecture developed by ARM Holdi…
- What is aaaAAA batteries are a standard cylindrical battery size measuring 10.5mm in diameter and 44.5mm in len…
- What is aacAAC (Advanced Audio Codec) is a digital audio compression format that provides better sound quality …
- What is aaa gameAAA games are high-budget video games developed by large studios with budgets typically exceeding $1…
- What is a proxyA proxy is a server that acts as an intermediary between your device and the internet, forwarding yo…
- What is agoraphobiaAgoraphobia is an anxiety disorder characterized by intense fear of situations where escape might be…
- What is a jockA jock is an athlete, especially in high school or college, known for participation in sports. The t…
- What is a jesterA jester is a professional entertainer employed by royalty or nobility to provide humor, satire, and…
- What is a juxtapositionJuxtaposition is a literary and rhetorical technique of placing two contrasting things side by side …
- What is a juggernautA juggernaut is an unstoppable or overwhelming force, power, or person that crushes all opposition. …
- What is a jointA joint is an anatomical structure where two or more bones meet and connect, allowing movement and f…
- What is a jewA Jew is a person who practices Judaism, is of Jewish descent, or identifies with Jewish culture, et…
- What is alsALS, or Amyotrophic Lateral Sclerosis, is a progressive neurodegenerative disease that affects nerve…
- What is a joint ventureA joint venture is a business agreement where two or more companies collaborate on a specific projec…
- What is amberAmber is fossilized tree resin that has hardened over millions of years, prized for its translucent …
- What is ambienAmbien is a prescription sedative medication containing zolpidem, used to treat insomnia by helping …
Also in Daily Life
- How To Save Money
- Why are so many white supremacist and right wings grifters not white
- Does "I'm 20 out" mean youre 20 minutes away from where you left, or youre 20 minutes away from your destination
- Why are so many men convinced that they are ugly
- What does awol mean
- What does asl mean
- What does ad mean
- What does asap mean
- What does apex mean
- What does asmr stand for
- What does atp mean
- What causes autism
- What does abg mean
- What does am and pm mean
- What does a fox sound like
More "What Is" Questions
Trending on WhatAnswer
Browse by Topic
Browse by Question Type
Sources
- Wikipedia - CNAME Record CC-BY-SA-4.0
- RFC 1035 - Domain Names - Implementation and Specification Public Domain