Root CNAME Flattening Replaces A record?

I’ve read the blog post explaining CNAME flattening and have enabled it for all my subdomains, but I’m fuzzy on the setup for the naked domain A record that points to my server’s IP address.

Am I right that it’s possible to replace the A record with a CNAME instead? I just don’t understand how that will resolve to my webserver IP address.

Currently setup example as:

domain.com A [IP ADDRESS]
subdomain1 CNAME domain.com
subdomain2 CNAME domain.com
subdomain3 CNAME domain.com

If it’s possible, can you explain how to convert the A record to a CNAME?

A CNAME for the naked domain will always be flattened. For actual host records it depends on the flattening settings and on whether they are proxied or not.

Which record are you referring to here? The naked domain or the three hosts?

The naked domain.

The naked domain will always be flattened.

So keep it exactly like my example?

It doesnt really matter. I am not sure why you are asking.

Also, your example doesnt show a CNAME but an A record.

Apologies if I wasn’t clear.

Based on the blog article, it appeared to indicate you could use a CNAME instead of an A record for the naked domain. It didn’t provide an adequate example of how to do actually set that up, which leaves confusion on how CF knows the IP of the webserver.

Is this possible or did I misunderstand the article?

Generally you cannot assign a CNAME to the naked domain, in Cloudflare’s case you can as they transparently flatten it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.