You try to point example.com (the "root," "apex" or "naked" domain) at a hostname like shops.example-platform.com using a CNAME record, and your DNS provider refuses. Route 53, for instance, returns an error in this form:
InvalidChangeBatch 400: RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com
Other providers word it differently, such as "CNAME records cannot be created at the root" or "conflicts with other records." Some providers let you save it and then something else quietly breaks, which is worse.
The rule is not a provider quirk. It comes from the DNS standards.
Why it is not allowed
A CNAME says "this name is an alias for another name, so ask about the other name instead." RFC 1034 specifies that when a CNAME exists at a name, no other records of any type may exist there. The apex of a zone must have at least an SOA record and NS records, so a CNAME cannot sit next to them. Most real domains also have MX and TXT records at the apex for email and verification. A CNAME would conflict with all of them.
Servers that allow the configuration anyway create unpredictable behavior. Some resolvers return only the CNAME and ignore your MX records, so email routing breaks or only works for some senders. That is why a registrar warning is actually protecting you.
Subdomains do not have this problem. www.example.com CNAME ... is ordinary and widely used.
What you can do instead
Option 1: ALIAS, ANAME or flattened CNAME at your DNS provider
Many providers offer a record that looks like a CNAME in the dashboard but returns A and AAAA answers at query time, so the apex stays standards compliant. Names vary:
- Route 53: alias records, for supported AWS targets such as CloudFront, load balancers and S3 website endpoints.
- Cloudflare: CNAME flattening, applied automatically to a CNAME at the root.
- Other providers: ALIAS or ANAME records.
Behavior differs between providers. They resolve the target on their side, so the answer follows target IP changes, but caching and TTL handling vary. Read your provider's documentation for specifics and for supported target types. For the mechanics, see CNAME flattening and apex domains.
Option 2: A and AAAA records
If the platform publishes stable IP addresses, point the apex at them directly:
example.com. 300 IN A 203.0.113.10
example.com. 300 IN AAAA 2001:db8::10
The risk is that the platform changes IPs and your site breaks. Only use this when the platform documents fixed addresses and commits to keeping them. Shopify, for example, tells merchants which apex A record to use; see Shopify custom domain DNS setup, and follow the platform's current instructions rather than copying old values.
Option 3: make www the main address
Serve the site on www.example.com with a regular CNAME, and redirect the apex to it. The apex still needs somewhere to answer HTTP, which means an A record at a redirect service or a registrar-provided forwarding feature. Registrar forwarding often does not cover HTTPS properly, so check that the redirect works over HTTPS with the Redirect Checker on a certificate-valid setup. For redirect behavior see HTTP redirects 301 vs 302.
Option 4: move DNS hosting
If your current DNS host supports none of these, move the zone to a provider that does. Plan the move with change nameservers without downtime and copy all records first.
Do not forget email and verification records
Whatever you choose, keep the MX, SPF, DKIM and DMARC TXT records on the apex intact. If a CNAME had been set there earlier, check they survived. The MX Lookup shows what mail servers the world sees, and SPF DKIM DMARC complete guide explains the records.
Checking your work
dig example.com A +short
dig example.com MX +short
dig example.com NS +short
dig www.example.com CNAME +short
With flattening or ALIAS, dig example.com A should return IP addresses even though the dashboard shows a hostname. Use the DNS Checker to confirm worldwide consistency, the Nameserver Lookup to confirm which provider is authoritative (changes made at the wrong provider have no effect), and DNS History to see what the apex looked like before. Run a Website Health Check to confirm the site loads over HTTPS on both apex and www.
Next steps
- Read CNAME flattening and apex domains.
- Review the DNS records cheat sheet.
- Look up the CNAME record definition.
- Check Shopify custom domain DNS setup if you host a store.
FAQ
Why can I use a CNAME on www but not on the root?
The root needs SOA and NS records, and a CNAME cannot coexist with other records. A subdomain like www normally has no other records, so a CNAME is fine there.
Is ALIAS a real DNS record type?
No. It is a provider feature that answers with A and AAAA records at query time. The records resolvers see are ordinary.
Will a CNAME at the apex break email?
It can. The CNAME conflicts with MX and TXT records, and resolvers may follow it and ignore your mail routing. Avoid it even if your provider lets you save it.
What if my provider has no flattening?
Use A records if the platform supports fixed IPs, serve from www and redirect the root, or move DNS hosting to a provider that offers an alias-type record.
Get notified when this fix updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.