I went to look in /etc/letsencrypt/live and I see 3 folders
‘digitalgoodsprovider.com’ <----oldest creation date
’digitalgoodsprovider.com-0001’
‘digitalgoodsprovider.com-0002’ <----newest creation date
This naturally will always inevitably break my code because my code will end up pointing to an outdated bunch of certs.
Also I can imagine what would happen If I left my server running over a long period (in production), when the code first boots up It will be pointing to the correct certs but it will always point to the same ones so it will eventually become unaccessible
Those -0001 and -0002 directories are generated when you change something in the list of domains contained in the certificate. Current certbot versions will ask you what to do: “expand” the current certificate or generate a new one (which will end up getting such a trailing number).
How was your certificate generated and how do you renew it?
Obviously, but what command did you use? With which options? Did you indeed remove or add hostnames from the certificate between “‘digitalgoodsprovider.com’ <----oldest creation date” and the -0001 folders?
Please show us “ls -l /etc/letsencrypt/live”, the contents of all of the files in /etc/letsencrypt/renewal and the command(s) you ran to issue the certificate(s) in the first place.
In any case… Going by the record of your certificates on https://crt.sh/?q=%digitalgoodsprovider.com, you’ve issued certificates containing three different sets of hostnames. The first certificates for each are: