Changing Hostname when a Site on the Server Presently Uses the Same Domain

GeekOnTheHill

Active Member
Feb 16, 2015
36
16
58
cPanel Access Level
Root Administrator
The present situation is as follows:

  • The hostname is server1.example.com
  • The nameservers are ns1.example.com and ns2.example.com
  • One of the hosted sites is example.com

No, it's not ideal and wouldn't even be allowed nowadays. But it is what it is.

If I change the hostname from server1.example.com to server1.example.net:

  • Will the nameservers remain ns1.example.com and ns2.example.com?
  • Will any of the existing DNS entries in example.com other than those referencing server1.example.com be changed?

Thanks.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
Hey there!

No, it's not ideal and wouldn't even be allowed nowadays. But it is what it is.
Why wouldn't that configuration be allowed? That seems pretty standard to me.

Changing the hostname of the server isn't related to the nameservers at all, so there would be no change there. It also wouldn't update the old records in DNS automatically.

Can you let me know what issues you're experiencing with this configuration?
 

GeekOnTheHill

Active Member
Feb 16, 2015
36
16
58
cPanel Access Level
Root Administrator
Thank you.

The current cPanel rules don't allow for the hostname to be the same as one of the sites being hosted on the server. Scroll down to "Networking Requirements" on this page.

It's also clumsy in other ways. I don't do it anymore on any shared server, regardless of the panel (or lack of one). It just complicates things down the line, especially when the site bearing the hostname's domain needs to be moved. Even on Virtualmin servers (where it is allowed and a site is created for the hostname's domain by default), I make that site a disposable placeholder.
 

GeekOnTheHill

Active Member
Feb 16, 2015
36
16
58
cPanel Access Level
Root Administrator
Correct - you can't have the hostname the "the exact same" as a domain hosting content. server.domain.com and domain.com are different, and that works fine and it is an extremely common setup.
Okay, thanks for the correction.

Although this may just have become a moot point. I just received an email with the latest cPanel price increases. I think it's time to move the last of my cPanel servers to Virtualmin.