CNAME Flattening as DNS Record Type

Hi all,

When will Cloudflare start support CNAME Flattening as DNS Record Type which also referred as ANAME or ALIAS records.I was trying out Azure static web app(similar to Cloudflare pages) when I add a custom domain(its a 4th level domain bypassing cf proxy, so Cloudflare only servers DNS) to Azure static web app and I found that the CNAME Azure gives returns to another CNAME record.

It happens at least 4 times before returning an A record which increases dns lookup time. I know free DNS like dns.he.net, namecheap dns do support ANAME records but I don’t want to add another login for one record.

Does anyone know how to apply CNAME flattering to subdomains for now? I use cloudflare free plan.

Thanks in advance

On free plans Cloudflare supports flattening only for the domain’s root record. If you want to flatten its actual CNAME childrens you will need to uprade to a paid plan. Though keep in mind, it currently is an all-or-nothing approach, so all CNAME records will be flattened in that case.

Also, it will only effectively work for unproxied records, as proxied records will always be “flattened” as they will be A records to the proxies.

1 Like

Thanks for the Reply,

Mostly CNAME Flattering and ANAME records work the same, but cloudflare isn’t providing those type of records. Even 5 records of those type will be enough for many user I believe.

Many JAMstack hosting providers are prioritizing these ANAME over CNAME.

Looks like I need to create a child zone away from cloudflare.

Anyway thanks for the help

What’s not clear about my previous reply? It should have addressed all your questions.

Post a screenshot of the record in question.

I got what you have said, my reply is that it will be helpful if cloudflare starts supporting ANAME/ALIAS record types

Why are you asking for the feature then? As I already mentioned, the root record is already flattened anyhow whenever necessary and for everything else you can use CNAME records on a paid plan.

So, essentially, it’s all there already.

Got Confused at “CNAME children” in your first reply. I thought it referred to CNAME loops to find A record rather than CNAME records in my dns zone.

finally got it, Can you give a suggestion for the below one

As said in my question it takes atleast 4 extra lookups to get the ip how can I optimize it

1)Pro Plan - not at all interested
2)moving a subdomain away from cloudflare to azure dns

Got anything for this

Thanks

Sometimes it takes almost 1sec for dns lookup in Asia/Pacific region where most people who will see the website reside. Its resume type website with brotli compression the total transfer size is max 10kb(generally 5kb) and almost less than 1sec for fullly loading.

I don’t want that 1sec lookup time, How can I optimize it

Well, if you don’t want to move to a paid plan you will have flattening only on the root record. But once more, if you proxy the records you won’t have any CNAMEs anyhow.

Proxying gives ssl error, its 4th level domain name.

I got my azure student credits so its ok for me to setup a subdomain dns zone at azure dns.

Thank you for the help, I really appreciate it

Yes, for that you’ll need a $10 certificate for the proxies.

If that’s not an option either and you have to use that kind of hostname structure, I am afraid you’ll have to use a CNAME and flattening won’t work.

But DNS resolution rarely is an issue with Cloudflare, so that will be most likely something about your local resolver. You could try switching to a public one, like Yandex, Google, or Cloudflare.

Resolution time in Asia/Pacific region are always higher than US/EU. DNS or CDN servers are less compared to europe and US.

its a personal website so I will try until I find my best configuration.

Thanks for the help

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