Chang hostname for a running hosting server?

Chris Worner

Well-known member
Registered
Joined
Apr 15, 2016
Messages
612
Points
28
I want to change hostname for a running hosting server? it is being used for sereral websites running under it, but the issue that I am guessing if I don't do right way when changing hostname then websites are running on this server will not work any more.
for example:

my hostname is server.mydomain1.com
I want to change to srv.mydomain3.com

How to change hostname without any downtimes for websites running with old hostname?
 

VirtuBox

Well-known member
Registered
Joined
May 3, 2016
Messages
1,622
Points
83
I want to change hostname for a running hosting server? it is being used for sereral websites running under it, but the issue that I am guessing if I don't do right way when changing hostname then websites are running on this server will not work any more.
for example:

my hostname is server.mydomain1.com
I want to change to srv.mydomain3.com

How to change hostname without any downtimes for websites running with old hostname?
Hello @Chris Worner,
hostname will not impact your website availability but after changing your server hostname, you will have to reboot the server to apply the new hostname.
Just edit the files /etc/hostname and /etc/hosts with the new hostname and then reboot your server.
 

24x7CSM

Well-known member
Registered
Joined
Sep 27, 2016
Messages
263
Points
28
Hostname will impact the websites availability if the name servers configured on the server are associated with the hostname of the server. e.g. if the hostname is srv.abc.com and if the name servers are associcated with the hostname like ns1.abc.com and ns2.abc.com and if you change the hostname to srv.xyz.com its going to create the issues.

so if you are in the above scenario make sure you will do the required changes.
 

Chris Worner

Well-known member
Registered
Joined
Apr 15, 2016
Messages
612
Points
28
Just edit the files /etc/hostname and /etc/hosts with the new hostname and then reboot your server.
I knew this but I am seeing my hosting control is configured accordingly to hostname on some places.
if the hostname is srv.abc.com and if the name servers are associcated with the hostname like ns1.abc.com and ns2.abc.com and if you change the hostname to srv.xyz.com its going to create the issues.
yes that's thing I am thinking about and i am afraid it will cause errors because i saw my hosting control panel is using hostname in more places. I don't know i should change them manully or my hosting control panel will update automatically when I change hostname from SSH.
 

Mrityunjay Gautam

New member
Registered
Joined
Dec 4, 2018
Messages
7
Points
1
Start a new terminal to see the new hostname. For any server such as Ubuntu without a GUI, run sudo vi /etc/hostname and sudo vi /etc/hosts and edit them one by one. In both files, change the name to what you want and save them. Finally, restart your computer to apply the changes.
 
Newer Threads
Replies
11
Views
3,380
Replies
4
Views
1,784
Replies
3
Views
1,545
Latest Threads
Replies
0
Views
115
Replies
0
Views
65
Replies
0
Views
57
Replies
1
Views
87
Similar Threads
Replies
16
Views
5,419
Replies
2
Views
2,612
Replies
1
Views
2,291
Replies
5
Views
4,471
Replies
14
Views
14,286

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top