Hello @Marco Leoni
To get HTTPS working for your domain and sub domain: test.com and www.test.com you need to import wildcard certificate into App Service.
- In the Azure portal, from the left menu, select App Services > <app-name>.
- From the left navigation of your app, select TLS/SSL settings > Private Key Certificates (.pfx) > Import App Service Certificate.
- Select the certificate that you just purchased and select OK. When the operation completes, you see the certificate in the Private Key Certificates list.
- Create SSL Binding. Select TLS/SSL settings and configure the TLS binding in the TLS/SSL Binding dialog, then click Add Binding.
If you do not have SSL certificate yet, you can purchase wildcard certificate at GoDaddy.
https://www.godaddy.com/web-security/ssl-certificate