Problem with Certbot renew

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g., so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: certbot certonly / certbot certonly

It produced this output: Congratulations! Your Certificate has been renewed

My web server is (include version):

The operating system my web server runs on is (include version): Debian GNU/Linux 5

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.31.0


So my problem is that if I run certbot certonly he gives me a positive output that my certficate has been successfully renewed, but if I visit the site, there's still the old certificate. Maybe I'm doing something really wrong. Certbot saves the certficate in a specific path, yet I don't know anymore what to do else. Thank you for your help


Hi @Joshua

certonly doesn't install and restart your webserver.

Did you restart your webserver?


Tried that aswell already, I tried something else now... I just selected the temporary webserver option, let me restart it real quick again ...

Sorry, I am kind of new to certbot and stuff.. :slight_smile:

Thank you for your reply!


Welcome to the Let's Encrypt Community :slightly_smiling_face:

You've already successfully acquired a certificate, so acquiring another one a different way will not help.

We need to fix your installation of the certificate.

Complete Certificate History


Thank you very much!

How can we fix the certificate installation?

Thank you so much for your help. :slight_smile:


Please try using this command:
certbot run --apache -d "," --keep-until-expiring

Note: Your most recent certificate included, but did not include, which may cause you problems. We can fix that too.


Now checked your domain -

You have created one correct certificate:

Issuer not before not after Domain names LE-Duplicate next LE
Let's Encrypt Authority X3 2020-10-20 2021-01-18, - 2 entries duplicate nr. 1
Let's Encrypt Authority X3 2020-10-06 2021-01-04 - 1 entries

That from 2020-10-20 is good.

But it's not used, so Certbot doesn't understand your configuration. And your configuration (see your redirects) looks inconsistent.

What says

apachectl -S
certbot certificates

A port 80 vHost with both domain names is required, so Certbot can use that as template to create the port 443 vHost.

PS: It's wrong to create a new certificate if the certificate already exists. There is a rate limit. So don't create a new certificate if you have already one created.


Alright, I did what you told me to do.

Got the same return now: Congratulations! Your certificate and chain have been saved at: [...]
Your key file has been saved at [...]
Your cert will expire on 2021-01-18. [...]


Thank you very much!

Yeah, I thought so. I mean I've seen the .pem file aswell on the linux server itself but I just can't figure out how to install it or how to tell my webserver to use this certificate ...

Thank you



I agree. I was hoping that the command I gave Joshua would set the live symlink to that certificate instead of the newer one that does not include


We're there! (Your certificate is now installed correctly.) :slightly_smiling_face:



Now you just need to fix your redirects...

The 302 here should be a 301 to :

Screenshot_20201026-024135_Samsung Internet

The 302 here should be removed entirely:

Screenshot_20201026-024045_Samsung Internet

You also want to make sure that has a single 301 redirect to

In short (all 301):


Thank you so much guys!!

I'll try to remove the redirects aswell... thank you!!!!


You're very welcome. :slightly_smiling_face: If your redirects end up as I've described, you will be in grand shape!

You might test your renewal just to be sure you'll end up with the right certificate. It should include both domain names ( and

certbot renew --dry-run

As @JuergenAuer mentioned earlier, you can use the following to view your certificates:
certbot certificates

Note the name of any certificate that does not include both and

You can use the following to delete any useless certificates to keep them from renewing:
certbot delete --cert-name name


Alright. Thank you a lot guys, you saved me a load of my nerves. :smiley:


Happy to help! :slightly_smiling_face: If you have any other questions or run into any further trouble, you know where to find us. Be well and godspeed! :wave:


@griffin That's the default, right? Why do you specifically add it to the command line? Might be confusing to some.



Because --keep-until-expiring is not the default for certonly or run. It should be though (and require --force-renewal to override). This is the reason why we get so many rate-limited visitors! Almost no one knows about --force-renewal, which is why renew is a safe command.

--keep-until-expiring, --keep, --reinstall

If the requested certificate matches an existing certificate, always keep the existing one until it is due for renewal (for the 'run' subcommand this means reinstall the existing certificate). (default: Ask)

To make matters worse:

If a certificate is requested with run or certonly specifying a certificate name that already exists, Certbot updates the existing certificate. Otherwise a new certificate is created and assigned the specified name.

1 Like

I think that's just partially true, as your quote already says (what I should have known): the user gets a question about what to do. So strictly speaking it's the users "fault", probably due to too little knowledge about what to do.

Eh, no, that's not worse: using --cert-name obviously overwrites the previous certificate if a new certificate is issued. That's the point of that paragraph.


And does not ask anything in regards to not being near expiry. If you naively specify to do so.

Even if a certificate already exists with the specified domain names that is not near expiry. (Does this one still happen, @Osiris?)

1 Like