Add certificate to domain that is on the different server

I am moving my website to a different server.

I can do it like this: move all files, change dns, add certificate. But this means there will be some time between moving websites and getting certificate, so my website will not have https during this time.

I would like to have ssl on the new server, so that when all files are moved and dns is changed, it would work immediately with https.

I can't do it right now with usual "-d example.com", it shows:

Challenge failed for domain example.com
To fix these errors, please make sure that your domain name was 
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address.

Is there an option to add domain certificate that has different DNS IP right now?

Welcome to the community!

You can move (copy) the certificate with its key together all the files to the new server.

4 Likes

Nice to know, I thought that it is bound to ip or server.

Do I need edit anything so it will autoupdate? Besides putting it into the same folder (/etc/letsencrypt/live/example.com/)

You may want to copy all the file tree of /etc/letsencrypt. It contains configuration files too. When the new system is in production (the domain name is pointing there), you may want to generate a test certificate, to make sure that everything is working as expected.
Verify the content of the crontab file, and copy it if needed. Just to be sure that the certificate renewal is properly scheduled.

3 Likes

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