www to the bare domain
The www host follows the apex, so only one address has to be maintained.
Monitor
Protect
Manage
By role
Security
Renewals
Monitoring
A CNAME (canonical name) record makes one hostname an alias of another: a resolver that finds a CNAME restarts the lookup at the target name and returns that answer. It is used for subdomains such as www or shop that should follow another hostname, and it cannot share a name with other records.
www.example.com. 3600 IN CNAME example.com.
shop.example.com. 3600 IN CNAME stores.example-shop.net.
; a lookup for shop.example.com follows the alias:
; shop.example.com CNAME stores.example-shop.net.
; stores.example-shop.net A 192.0.2.44| Rule | Consequence | Source |
|---|---|---|
| No other data on the same name | You cannot add MX, TXT or A records to a name that has a CNAME | RFC 1034, 3.6.2; RFC 2181, 10.1 |
| Not at the zone apex | example.com itself must keep SOA and NS records, so use A/AAAA or an ALIAS record | RFC 1034; RFC 2181, 10.1 |
| NS and MX targets must not be aliases | Mail and nameserver hostnames need their own address records | RFC 2181, 10.3 |
| No loops | A CNAME chain that points back at itself is an error | RFC 1034, 3.6.2 |
Your service (website builder, CDN, shop platform) gives you a hostname such as stores.example-shop.net. Copy it exactly.
Type CNAME, name = the subdomain only (www, not www.example.com, in most panels), value = the target hostname. A trailing dot is optional in most panels.
Delete any A, AAAA, MX or TXT record on the same subdomain, or the provider rejects the CNAME.
Run nslookup -type=CNAME www.example.com 1.1.1.1 and confirm the target. Then check that the target resolves to an address.
A CNAME can be correct while the site is down if the target no longer resolves. DNS monitoring keeps a history of record changes so a repointed or removed CNAME shows up in your alert queue.
The www host follows the apex, so only one address has to be maintained.
Shop, help desk and landing page platforms give you a target hostname and ask for a CNAME on a subdomain.
Some certificate authorities and email services ask for a CNAME with a generated name to prove control of the domain.
A CDN provides a hostname for your subdomain so it can steer visitors to a nearby edge location.
A CNAME lets a subdomain follow another hostname, so when the target changes address you do not edit your own zone. Typical uses are www pointing at the apex, and subdomains pointing at hosted services.
No. A CNAME value must be a hostname. To point a name at an IPv4 address use an A record, and for IPv6 use an AAAA record.
The root of a zone must hold SOA and NS records, and a CNAME cannot coexist with other data on the same name. Use an A record or a provider ALIAS/flattening feature at the apex.
No. Because a CNAME excludes all other records on that name, mail for that exact name would break. Put MX records on a name that has no CNAME, and point MX targets at hostnames with address records.
DNS has no fixed limit, but every extra hop adds a lookup and a place to fail, and resolvers cap the number of hops they follow. Keep chains short, ideally a single CNAME to a name with address records.
Aepto keeps a history of every DNS record change per domain and alerts you on any change or only risky ones.