With VestaCP, we can create websites very easily with hardly any effort, and naturally, we want our visitors to feel secure when they see that we use HTTPS and have a green padlock next to our domain. Thanks to Let’s Encrypt, this is incredibly easy to do these days. In fact, it is so easy that you only need to click once. First, however, you need to bear a few things in mind to ensure that the certificate is created on the first attempt.
The first thing to bear in mind is that our domain must point to our VestaCP server. Without this step, you cannot proceed with anything explained here.
When we create a new website in VestaCP, we are given several configuration options once it has been created. One of these is enabling Soporte SSL, where we can add an existing certificate or create a new one by enabling the option Soporte Lets Encrypt. When we click this last option, the following message will appear in green: Your certificate will be issued automatically in 5 minutes.
Finally, we save and see that an error appears:
This error occurs because Let’s Encrypt and VestaCP run a command to create the certificate for a specific domain. However, Let’s Encrypt needs an email account to send domain renewal notifications. By default, it uses the email address configured in the admin account. Since we have not configured this ourselves, it uses an email address that does not exist, which causes the error. This is why we need to configure an email address first.
Go to Usuarios > Admin > Editar and change the email address to one of your own:
Finally, all that remains is to go to Web > miweb.com > Editar and re-enable the options for SSL, and save. In a few moments, we will be able to access our website via HTTPS.