1

We have our current corporate website hosted on traditional servers that we point to with an ip address. Our website is available at example.com and www.example.com and both domains have A records pointing at the the server ip.

We are now starting to host our website in Azure and the environment is fronted by Azure Front door. So we don't have an ip address anymore, only the address examplecom-prod.z01.azurefd.net.

For the www.example.com I think it's fairly simple to remove the A record and add a cname record pointing to examplecom-prod.z01.azurefd.net.

For the apex domain example.com I'm not sure. Is it as easy there? Just remove the A record and add a cname?

  • 1
    Does this answer your question? [Why can't a CNAME record be used at the apex (aka root) of a domain?](https://serverfault.com/questions/613829/why-cant-a-cname-record-be-used-at-the-apex-aka-root-of-a-domain) – Bob Feb 03 '22 at 08:06
  • In that answer it says "The bulleted list makes it explicitly clear that a SOA, NS, and A records cannot be seen at a node where a CNAME also appears. When we combine this with section 6.1, it is impossible for a CNAME to exist at the apex as it would have to live alongside mandatory SOA and NS records.". But is it actually so that a cname cannot exist at the apex domain if we remove the a record? – Mathias Rönnlund Feb 03 '22 at 11:07
  • 1
    No, removing the `A` record at the apex of your domain won't create a spot for a `CNAME` record. According to the relevant RFC's you would also need to remove the mandatory `SOA` and `NS` records, as well as the typical `MX` records and doing that would leave your domain inoperable. – Bob Feb 03 '22 at 11:20
  • This is the best document describing it so far: https://www.isc.org/blogs/cname-at-the-apex-of-a-zone/. One solution state is to add an ALIAS record to the apex domain but it also says that's a "non-standard DNS feature". Does that still hold true or is that now a viable solution? – Mathias Rönnlund Feb 03 '22 at 12:00
  • 1
    The `ALIAS` or `ANAME` record is non standard in the sense that it depends on the capabilities of the authoritative name servers for your domain. If your DNS provider supports those, then you can use them but AFAIK they are not universally supported. – Bob Feb 03 '22 at 12:38
  • 1
    You need to use a redirect server where the apex A record points to, and that would do a `301` redirect to `www.example.com`. – Tero Kilkanen Feb 03 '22 at 15:49

1 Answers1

0

Given that AWS supports this using Route53 Aliases, then I would expect a competitor to do the same.

A quick search shows this page which talks about apex records. You may have to migrate your DNS management into Azure for your public records to achieve this though.

shearn89
  • 3,143
  • 2
  • 14
  • 39
  • I don't thing the Ops team want to change our dns provider (a big telco who has managed it for us for a long time) and move our apex domain dns to azure. – Mathias Rönnlund Feb 03 '22 at 11:08