What does a CNAME record look like in my DNS settings?
A CNAME has a name (the alias), a type and a target (the canonical name). Many DNS hosts ask for the same three fields, plus a TTL. Some require a full stop at the end of the target.
; alias TTL class type target
shop.example.com. 3600 IN CNAME example-store.myshopify.com.
www.example.com. 3600 IN CNAME example.com.
A visitor who asks for shop.example.com is sent on to example-store.myshopify.com. The lookup carries on from there until it reaches a record with an IP address. Cloudflare's documentation says a proxied name can use a chain of CNAMEs, as long as the final record points to a hostname with a valid A or AAAA record [3].
Is a CNAME the same as an A record?
No. An A record maps a name straight to an IP address. A CNAME maps a name to another name and lets that name decide the address. Use an A record when you know a fixed IP address. Use a CNAME when a provider gives you a hostname and tells you to point at it.
Why can't I put a CNAME on my root domain?
RFC 1034 says that if a CNAME is present at a node, no other data should be present, so that the data for a canonical name and its aliases cannot be different [2]. Your bare domain (example.com) already holds other records, such as the ones that name its servers and its email, so by that rule a plain CNAME has no room there. Some DNS hosts refuse it and some work around it. Cloudflare's workaround is called CNAME flattening: it finds the IP address that a CNAME points to and answers with that [5]. Otherwise, put the CNAME on a subdomain such as www and send the bare domain to it through your host's redirect or an A record. Read your own host's page before relying on a workaround.
Can an email MX record point at a CNAME?
It should not. RFC 2181 states that the name used as the value of an NS record, or part of the value of an MX record, must not be an alias [4]. Point MX records at a host that has its own address record, exactly as your email provider tells you.
A shop on its own subdomain
Say your shop platform tells you to add shop.example.com as a CNAME to example-store.myshopify.com. You add it in your DNS host and nothing else changes. If you had already put an MX record on shop.example.com for email, the CNAME would clash with it, so use a different subdomain for the shop.
Questions people ask
What does CNAME stand for?
CNAME stands for canonical name. The record names the canonical, or primary, name for an alias, so the alias name follows wherever the canonical name points [1].
Can a CNAME point to an IP address?
No. A CNAME target must be another domain name [1]. To point a name straight at an IP address, use an A record instead, and see A record.
Does a CNAME slow my website down?
Slightly. The resolver has one more name to look up before it reaches an IP address, and it then caches the answer for the record's TTL [3]. For a normal business website the extra step is small.
Pages that link here
A record, CDN, DNS, DNS propagation, Domain name, MX record, Web hosting
See also
- DNS DNS is the internet's address book: it turns a domain name like example.com into the number a computer needs to find your website or mail server.
- A record An A record is a DNS entry that maps a domain name to an IPv4 address, so browsers know which server to contact.
- MX record An MX record is a DNS entry that names the mail server that receives email sent to your domain.
- Domain name A domain name is your website's address on the internet, such as example.com.sg, that people type to reach your site and send email to you.
- Web hosting Web hosting is renting space on a web server that stays connected to the internet, so your website's files can be sent to anyone who asks.
- CDN A CDN is a group of servers in many places that keep copies of your website's files so each visitor gets them from a server close to them.
References
- RFC 1035: Domain Names, Implementation and Specification, IETF. Read 27/11/2026.
CNAME A <domain-name> which specifies the canonical or primary name for the owner. The owner name is an alias.
- RFC 1034: Domain Names, Concepts and Facilities, IETF. Read 27/11/2026.
If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different.
- DNS record types, Cloudflare Docs. Read 27/11/2026.
the final record must point to a hostname with a valid IP address (and therefore a valid A or AAAA record).
- RFC 2181: Clarifications to the DNS Specification, IETF. Read 27/11/2026.
The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias.
- CNAME flattening, Cloudflare Docs. Read 27/11/2026.
With CNAME flattening, Cloudflare finds the IP address that a CNAME points to.