Mistakenly installed two certificates on one server

Good day,

I have one server with virtual host.


I installed two certificates for the urls.
Now every time I visit url1, I get the certificate for url2.
We decided to move url2 to another server.
I deleted the url2 certificate in the server.
However, we are still getting the url2 certificate when we visit url1.

Do I just wait for it to reset?

Hi @jon.codelean

please share your domain names. And your configuration:

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. https://crt.sh/?q=example.com), 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:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

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

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

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

Okay, sorry about that.

The OS is Ubuntu 18.04.3 LTS
The hosting provider is Linode
The http server is Apache 2.4.29
The certbot is 0.23.0

The command I ran is this.
certbot certonly

I decided to place a file in the webroot.
Then I entered the url.
Then I entered the web root.
Then the command gave me the congratulations message.

  • Congratulations! Your certificate and chain have been saved at:
    Your key file has been saved at:
    Your cert will expire on 2019-12-18. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot
    again. To non-interactively renew all of your certificates, run
    “certbot renew”
  • If you like Certbot, please consider supporting our work by:

First I did it for domainforexamplesite.com.
Then it did it for 1hourproofreading.com.

However, 1hourproofreading.com already has https with cloudflare, so apparently I did not need to do that. Now domainforexamplesite.com is displaying the certificate for 1hourproofreading.com.

I did these commands now

certbot delete
I deleted the certificate for 1hourproofreading.com

domainforexamplesite is still showing the certificate for 1hourproofreading.com

certbot delete
I deleted the certificate for domainforexamplesite.com

certbot certonly
I redid the process for the certificate of domainforexamplesite.com again

It is still showing the certificate for 1hourproofreading.com

I have root access to the servers.

If you change your configuration, you have to restart the server.

If you delete a certificate one webserver uses, you can't start the webserver -> never delete certificates which are used.

Check your vHost configuration.

apachectl -S

and your vHosts to find the certificate files.

Thank you very much for your prompt reply.

It was a great help.

This is what I did.

I restarted the server from the linode admin.
I connected to the server via ssh.
I restarted the apache2 service.

Apache2 refused to start because the onehourproofreading.com ssl configuration was looking for the certificates that I deleted.

I ran this command to disable the onehourproofreading.com ssl configuration.

Then I restarted apache2 service again.

https://domainforexamplesite.com now displays the correct certificate.

onehourproofreading.com still has ssl because of cloudflare configuration, and it is also running on another linode.

Thank you for the assistance.

1 Like

That's the critical thing. Before deleting certificates, make a backup.

Happy to read that you have found a solution. :+1:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.