CNAME and Azure Front Door

Hi,

I am trying to setup Azure Front Door and need to create a CNAME at the root of my domain. I have added @ and the CNAME to my Azure Front Door domain (which works for www.mydomain.com). However, when I query the name servers, Cloudflare does not provide a CNAME record for my root.

I have a ticket raised with Microsoft and they believe the issue is down to my DNS configuration. However, I cannot see anything wrong?

You can’t have a CNAME at the root, as per the DNS spec…

Hi @paul.sanders,

I suspect this is related to CNAME flattening.

Hi @domjh,

Thats correct, yes.

We are using CNAME flattening as it is the only way I can use Azure Front door at the root of our domain.

Thanks
Paul

Agreed, I am talking about using CNAME flattening.

Then it will return an A record, with the IP of the CNAME resolution.

1 Like

Thanks @matteo, thats an interesting point. If it is returning an A record, then it wont be possible for me to use Azure Front door (a part of the configuration to enable it, it queries for a CNAME, and doesn’t get a response). If this is standard behaviour then i’ll have to go back to the drawing board. Unless you whether there is a guide somewhere that talks me through using cloudflare with AzureFD?

Flattened CNAME isn’t really CNAME anymore, it’s plain IP address resolution so it becomes A and AAAA (v6) when the response comes out of Cloudflare’s DNS servers.

CNAME, in addition to A and AAAA records, also “proxies” almost all other kinds of records, so when a.example.com resolves to b.example.com via CNAME and b has an MX or TXT record, it gets resolved onto a as well. I’m guessing that Azure FD utilizes additional records (particularly TXT) for various purposes, which is totally ruined by CNAME flattening.

My recommendation would be to use a subdomain where you can CNAME to another, and give up attempts to pull this off with your apex domain.

Not really sure about a guide, any chance you could configure it to a subdomain (www for example) and then redirect the root?