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
10
Views
2,848
Replies
4
Views
1,585
Replies
3
Views
1,348
Recommended Threads
Replies
10
Views
4,084
Replies
14
Views
5,182
Replies
1
Views
1,102
Replies
1
Views
1,637
Similar Threads
Replies
16
Views
4,761
Replies
2
Views
2,370
Replies
1
Views
2,025
Replies
5
Views
4,006
Replies
14
Views
12,529

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