Did you try connect on the server with ssh and this command sudo yunohost domain cert renew ??
Did you have added your subdomain www dns conf on your registar ?
Yes, I have. It seems that it does not work out of the box. Now I installed the Redirect app and now the problem is gone.
So, first add the www-domain to yunohost, get the letsencrypt certificate and then install the Redirect app, fill in the redirection details and then the website works with both www and without www
Does this work for you? For me not. I tried that. The second domain would then direct to the YH-admin as my website (dokuwiki) is installed on the first domain. So, the Redirect app seems to be the only option, at least in my case.
@TheNomad11 this is a support request, moved to its proper section.
Please provide all necessary information (type of server, YunoHost version). Include your Diagnosis report, that’s important to check DNS.
As stated above, if you need to expose both my-yunohost-domain.com and www.my-yunohost-domain.com to the Internet, you need to register both of them as domains in your webadmin. Then you need to make sure the DNS records are correct (CNAME may not be enough,) before generating Let’s Encrypt certificates for both domains.
What you do with them afterwards is up to you. You can definitely setup a Redirect app to redirect from one to the other.
Thanks! @tituspijean Maybe this info could be added to the documentation here? Certificate | Yunohost Documentation I suppose this would be useful for many users. Not everybody might be aware of the extra steps needed for making both www and non-www work?