Ongeldige certificaatnaam bij gebruik van www

AI-generated summary

Bastiouf is experiencing an “INVALID_CERT_NAME” error when accessing their Discourse site via www.freebine.com, while the direct IP or non-www version works. They’ve followed the official setup guide, configured DNS, firewall, and Let’s Encrypt, but the issue persists. merefield explains that the hostname in app.yml must match the domain used for HTTPS certification, and to support both www and non-www, multiple domains must be registered. Bastiouf thanks them for the quick and helpful response.

Hi everybody !

(Sorry for my bad English, being French doesn’t help much :D)

Also sorry about my knowladge which is not really good so far but Discourse is forcing me to become a great web admin :joy:

I purchased my domain name (freebine.com) onto Hostinger and then the VPS on the same hoster. A few days later I realized that their VPS plans were quite expensive so it can match Discourse’s requierements.

I decided to buy a VPS on OVH which is great so far !

  • My problem is the following : when I try to access my website using Chrome or whatsoever by typing www.freebine.com I get INVALID_CERT_NAME, when using the direct IP followed by :443 / :80 or removing www it works fine.

What I did so to get my Discourse working :

  1. Making my VPS working under Ubuntu 20.04 LTS
  2. Following the official installation guide
  3. Setting up DNS so the domain is linked to my server’s IP
  4. Setting up a firewall (OVH’s firewall and ufw so 80, 443 ports are unlocked)
  5. Filling the app.yml as told (used mailgun) + entering my private email address for the lie let’s encrypt address
  6. Followed the guide : Setting up HTTPS using Let’s Encryp
  7. Did all the troubleshoting stuff that came out from this guide, everything is good…

I’m not quite sure if my post is detailed enough or if you need some more informations to help me, or other ressources. Fell free to ask I’ll give them as asked :stuck_out_tongue:

This issue is really annoying, being unable to solve it using existing post make me feel guilty, hope the exact same problem hasen’t been discussed before.

Waiting for your great help,

Best Wishes !!!

What hostname did you enter in app.yml? The build process will certify this one.

If you want both www. and domain name only to both take you there you will need to register multiple domains.

See: Set up Let’s Encrypt with multiple domains / redirects

You’re my hero !

Did not expect such a quick anwser, really pro forum here !

Thanks agan :slight_smile: