Changing domain name associated with the server


I have a working LAMP server that I used to set up a new website. The server has a temporary domain pointing to it (e.g. and I’m using Let’s Encrypt to provide SSL.

Now that everything is set up and working, I’m ready to point the actual domain (e.g. to that server.

To do that I will change the DNS records with the registrar to point to DO and set up the appropriate settings under Networking->Domains.

How do I go about changing the SSL on the LAMP instance itself? Can I just run: certbot --apache -d -d and it will take care of it all, or will there be problems because a different domain was set up previously?

I’m hesitant to just test this out because I want to have minimal downtime during the switch so I figured I’d ask the community.

Thanks in advance!


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hello friend!

Running certbot for the new domain will likely take care of it fine. I’m assuming you haven’t explicitly defined the temporary domain in the servername/serveralias variables but instead have a default virtual host with a specific SSL being the only clear reference to the domain. It could take more if I am assuming wrong, but through the process of mentioning that possibility it should remind you of any configurations you’ve already made.

Kind Regards, Jarland