Hello Tarek Alhamad,
Thank you for posting your question in the Microsoft Q&A forum.
This recurring failure during the creation of a managed certificate for your subdomain, specifically the "Pending certificate expired" error, typically indicates a problem with the domain validation process managed by Azure's certificate authority (CA), Let's Encrypt. The issue often stems from DNS configuration or validation challenges that prevent the CA from successfully verifying your domain ownership before the temporary validation token expires.
Firstly, ensure that your subdomain (e.g., www) has a correct CNAME record pointing to your Azure App Service. The record must be properly propagated and resolvable globally, as Let's Encrypt’s validation servers might fail to resolve it due to delays or misconfigurations. Additionally, if your domain uses any DNSSEC, ensure it is correctly configured, as validation failures there can also disrupt the process.
Secondly, review your App Service configuration to confirm that the subdomain is explicitly listed as a custom domain within your App Service settings. Azure requires the domain to be bound to the App Service before it can issue a certificate, and any discrepancy here can cause the validation to hang and eventually time out.
If these steps do not resolve the issue, consider creating the certificate manually using a different CA, such as via App Service Certificates (which integrates with Key Vault) or a third-party certificate imported into Azure. This bypasses the automated validation challenges while still securing your subdomain. Given you have a support plan, escalate the case with Azure support, providing detailed logs and DNS configurations, as they can investigate backend validation attempts and identify specific failures.
Please, let me know the response helps answer your question? If the above answer helped, please do not forget to "Accept Answer" as this may help other community members to refer the info if facing a similar issue. 🙂