Does CNAME Flattening apply to non-proxied DNS records?

I’ve had CNAME Flattening set to “Flatten all CNAMEs” for the performance boost since a couple of my subdomains unfortunately have a chain of CNAMEs to resolve.

I recently signed up with a new email API and for deliverability they need a CNAME record set for the return path of all outgoing messages. I made sure to set the cloud icon to grey (not proxied) and yet their config pages still wouldn’t OK my DNS setup. I tried changing the CNAME flattening setting to only “Flatten CNAME at root” and then everything was approved by the email service.

I presumed that with the grey cloud icon the DNS entry would just work like a “normal” one with any other DNS service, but if you switched this to orange then “Cloudflare would apply” and stuff like CNAME flattening would take place?

I did read through the blog post where CF launched CNAME flattening but it doesn’t seem to address this. I also only have a Pro account so maybe there is more control if you have Business/Enterprise?

Also, not trying to be snarky, but if a CNAME record just returns the string set in it - what is the difference between a CNAME record with the orange cloud and with the grey cloud? Both would just return the same string? Maybe there is something I don’t understand re: CNAMEs.

I’m pretty sure Flattening is a DNS configuration and has nothing to do with proxying. After all, if you proxy a CNAME, it gets flattened anyway and gets set to a public IP address of the proxy.

OK, thank you. That would explain the behavior I’m seeing. Would you know if one had a Business plan whether you could set flattening on or off on a per record level? Or is it just always a global DNS configuration that you can’t manage with any granularity?

It’s global. On Business and Enterprise plans, that DNS toggle looks just the same as it does on Pro plans.

I suppose one workaround would be to flatten them yourself, but that’s not a great solution. You’d have to enter “A” records with the IP address(es) of the destination, but that’s subject to change at the other end, which is kind of the point of CNAMEs.

I see, thanks for this extra information.

Yes, it wouldn’t make sense to try flattening the records from my side - I think the reliable options are either leave the setting off or let CF handle it. I have a lot of load balancing CNAMEs and then you want the fast & automatic updating.

My next move will be to check with the email service, maybe CNAME flattening is only tripping up their account setup process and wouldn’t actually affect deliverability. I don’t know enough about how email receivers like Gmail or Hotmail would look up the return path CNAME and what they expect - some reading required!

Thanks for your answers.

1 Like

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