@Siddhant Shah Azure App Service is a PaaS cloud service offering, which typically has more restrictions in place. As a result, I do not believe that certbot will work on an Azure Web App.
If you are looking for a free certificate to secure your subdomain, then Azure does offer that. It does have these limitations:
- Doesn't support wildcard certificates.
- Doesn't support usage as a client certificate by using certificate thumbprint, which is planned for deprecation and removal.
- Doesn't support private DNS.
- Isn't exportable.
- Isn't supported in an App Service Environment (ASE).
- Only supports alphanumeric characters, dashes (-), and periods (.).
And these requirements for subdomains:
- Must have CNAME mapped directly to <app-name>.azurewebsites.net or trafficmanager.net. Mapping to an intermediate CNAME value blocks certificate issuance and renewal.
- Must meet all the above for successful certificate issuance and renewals.
Here is the source documentation and where to learn more about this.