• The error message that you are encountering while browsing the naked domain, for e.g.: - ‘example.com’ is ‘ NET::ERR_CERT_COMMON_NAME_INVALID ’ which clearly resembles that there is no existing ‘A’ record found for the naked domain DNS record, i.e., ‘example.com’ in this case. While there may exist an ‘A’ record for ‘www.example.com’, ‘mail.example.com’ or ‘app.example.com’ due to which when you are trying to browse these, they are readily accessible, but the same is not possible for your naked custom domain.
Thus, to resolve this issue, you will have to create an ‘A’ record in your public DNS registrar, i.e., GoDaddy for your naked domain, i.e., ‘example.com’ or for a wildcard entry ‘*.example.com’ so that when you are trying to directly access your custom domain name, you will be redirected to the original Azure static website.
https://support.microsoft.com/en-us/topic/associating-a-custom-domain-name-and-securing-communication-with-azure-0eeba4ff-3432-e59a-7f7a-0ee8c7cd7c11
• But, for the same thing above to be accessible over HTTPS, you will have to upload an SSL/TLS certificate in Azure keyvault and integrate it with Azure CDN as described in the Microsoft documentation
below. Also, you need to ensure that common names like ‘*.example.com’, ‘example.com’ and others needed are already included in that certificate. To be more precise, a wildcard certificate if requested and generated will work best in these scenarios and be of use in all circumstances.
https://learn.microsoft.com/en-us/azure/cdn/cdn-custom-ssl?tabs=option-2-enable-https-with-your-own-certificate#tlsssl-certificates