Procedure to change main Domain

webriddler

Verified User
Joined
Nov 5, 2019
Messages
30
Hi,
I want to change my main domain from somesite.dev to somesite.net and will also need to update my primary cp hostname to cp.somesite.net.

Can anyone point me in the right direction?
 
Hello.
First change you main domain. Here are some examples on change domain or set another domain as default.

If that is done, go to the admin section as admin, and there under admin settings and change the hostname:
Wait 1 or 2 minutes so the DA queue is ready.

In admin section as admin, delete the old DNS zone in DNS administration and create a new one with the new hostname.

Once that is done, be sure you set the hostname in the OS to. Also adjust the /etc/hosts file with the new domain name and maybe /etc/HOSTNAME file would also be good.
For Centos/Alma/Rocky you can use these commands as root via SSH:
Code:
hostnamectl set-hostname cp.somesite.net
hostnamectl

To be sure, reboot server.

At last, you might need a new SSL certificate for your new hostname:
Code:
cd /usr/local/directadmin/scripts
./letsencrypt.sh request_single cp.somesite.net 4096

And you should be ready to go.
 
Back
Top