Use same domain for WHM hostname and cPanel account

regisit

Active Member
Jul 31, 2013
28
1
3
cPanel Access Level
Root Administrator
Perhaps a silly question, but I can't find a clear answer! On a dedicated server owned by one business just for their own sites, can I use the same domain for both the WHM hostname (domain part) and a cPanel account?

I initially setup the server with hostname "sites.domain1.co.uk" and a cPanel account with the primary domain "domain2.co.uk". But now I need the cPanel account to have a primary domain of "domain1.co.uk" and will park "domain2.co.uk" onto that account.

Is that ok to do i.e. change the primary domain on the hosting account to domain1.co.uk? Worried about seriously knackering the server as our dedicated server provider is proving to be of zero help when it comes to managing WHM/cPanel!

The account is for a Magento multi-store site so initiailly the FQDN of the 1st store will "store.domain2.co.uk" while under development and eventually just "domain2.co.uk" or "www.domain2.co.uk" (tbd). Other stores will be added with the own domains i.e. "domain3.co.uk" (i.e. not subdomains of domain1 or domain2. The Magento admin interface will primarily be accessed on store.domain1.co.uk
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

It's acceptable to setup an account for the domain name associated with the hostname. For instance, if your hostname is "server.cpanel123.com", it's fine to have "cpanel123.com" as an account. However, you would not want to setup "server.cpanel123.com" as an account.

Thank you.
 

regisit

Active Member
Jul 31, 2013
28
1
3
cPanel Access Level
Root Administrator
Thanks for swift confirmation Michael. Can I also ask, what happens to the subdomains already setup on the account?

I have store.domain2.co.uk and main.domain2.co.uk currently. Will they be retained but become store.domain1.co.uk and main.domain1.co.uk or removed as part of changing the domain?

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

They are retained and updated to reflect the new domain name.

Thank you.
 

regisit

Active Member
Jul 31, 2013
28
1
3
cPanel Access Level
Root Administrator
Hi Michael, switch seemed to go ok, but now trying to park domain2.co.uk onto the account for domain1.co.uk and getting the following..

Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

Any ideas? This domain is DNS is maintained elsewhere and releavnt A records are already setupin that DNS (was previously fine with domain2.co.uk being the primary domain).
 

regisit

Active Member
Jul 31, 2013
28
1
3
cPanel Access Level
Root Administrator
Ok thanks - works now. Given we own this server and won't be running accounts for anyone else, I guess it's ok to leave this setting on?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
You are welcome to leave the ability to add remote domains on, but ensure you disable it again if you grant cPanel access to other users.

Thank you.