Hello James Munro
Azure Front Door (AFD) and Azure App Service can both use Azure-managed certificates for custom domains. However, when AFD is introduced, it becomes the primary endpoint for your custom domain. This means:
- The DNS records (A and CNAME) are updated to point to AFD.
- The App Service custom domain binding may no longer work as expected because the DNS no longer points directly to the App Service.
- The error you encountered, "Auto-Renewal Failed," occurs because Azure App Service requires the A record (for apex domains) or CNAME (for subdomains) to point directly to the App Service for the managed certificate to renew. When the DNS points to AFD instead, this requirement is not met.
To meet the best practice of preserving the original HTTP host name between AFD and the App Service:
- Configure AFD to forward the original host name in the Host header to the App Service. This ensures that the App Service sees the original custom domain in requests.
- Ensure that the App Service has a valid TLS certificate for the custom domain. Since the Azure-managed certificate cannot auto-renew in this setup, you may need to use a custom certificate (e.g., from a third-party CA) and manually upload it to the App Service.
Refer: https://learn.microsoft.com/en-us/azure/app-service/tutorial-secure-domain-certificate
If above is unclear and/or you are unsure about something add a comment below.
Just checking in to see if below information was helpful. If you have any further updates on this issue, please feel free to post back.