Paul_King reported that since September 30, 2021, his site https://www.nzarchitecture.net.nz triggers a browser certificate error (NET::ERR_CERT_COMMON_NAME_INVALID) because the Let’s Encrypt certificate is issued for nzarchitecture.net.nz without the ‘www’. This caused Facebook to flag the site as non-compliant, disabling Facebook login. While the certificate is valid as confirmed by IAmGav, Facebook requires the exact domain registered with them — in this case, the non-www version — and won’t accept mixed usage. Paul_King’s DISCOURSE_HOSTNAME was correctly set to nzarchitecture.net.nzpost 7, but users accessing via ‘www’ still saw warnings. Falco clarified that ‘www’ is not an alias but requires a proper redirect with its own certificate post 9. Paul_King sought a way to extend the existing Let’s Encrypt certificate to cover both domains without added cost or complexity. JammyDodger and Simon_Manning provided a solution: adding a custom Let’s Encrypt command in app.yml to include the www subdomain during certificate generation. After correcting indentation and rebuilding, the fix worked perfectly, resolving both the certificate warning and Facebook compliance issue post 14.
Since around September 30th 2021 (as far as I can tell) my site has been generating certificate errors
your connection is not private
NET::ERR_CERT_COMMON_NAME_INVALID’ security warning.
This server couldn’t prove that it’s www.nzarchitecture.net.nz ; its security certificate is from nzarchitecture.net.nz . This may be caused by a misconfiguration or an attacker intercepting your connection.
The issue persists, even after updating to 2.8.0 beta 7, and doing full rebuild.
A consequence of the error message appearing on my landing page is that the site is flagged as no longer meeting Facebook requirements, meaning Facebook login has been disabled by Facebook.
The thing is that even I see these errors when including ‘www’ in the url I paste/type into browser - so even though there is no actual risk, users are being hit with worrying warnings. with or without the Facebook compliance issue.
Facebook meanwhile refuse to review the matter until the error disappears
OK, I suppose that makes sense - but from a DNS point of view one is an alias of the other (or so I believed) - and it is is going to be hard to tell the average user that they can’t use ‘www’ - especially if they need to log in to see any warning to that affect…
It’s not really an “alias” but a redirect. And you need to properly configure a redirect, which includes having a certificate in place for the place the redirect lives.
Until recently, this had never been a problem - no Facebook warning, and no certificate warnings with or without the www.
Is there any way to get the default free Let’s Encrypt’ certificate to certify both options? Keen not to complicate things with extra certificates to manage and extra cost
There are a lot of emails out there with links to the site that include the www.
By ‘the place the redirect lives’ do you mean Digital Ocean in this case? (my host, and where DNS settings are managed from)
Edit: Actually it looks like the use of --keylength has been replaced by -k, so you’ll need the following instead:
Apologies, my Github search lead me to an old fork without me noticing. --keylength is correct.