Chang hostname for a running hosting server?

Chris Worner

Well-known member
Joined
Apr 15, 2016
Messages
430
Best answers
1
Ratings
40
Points
28
#1
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

Global Mod
Staff Member
Joined
May 3, 2016
Messages
1,604
Best answers
4
Ratings
448 13
Points
83
#2
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

Moderator
Staff Member
Joined
Sep 27, 2016
Messages
258
Best answers
1
Ratings
47
Points
28
#3
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
Joined
Apr 15, 2016
Messages
430
Best answers
1
Ratings
40
Points
28
#4
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.
 
Joined
Dec 4, 2018
Messages
7
Best answers
0
Points
1
#5
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
Latest Threads
Replies
0
Views
2
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
Replies
0
Views
1
Replies
1
Views
21
  • Deleted
  • Deleted by fwh
Replies
0
Views
1
Similar Threads
Replies
16
Views
374
Replies
2
Views
1,265
Replies
1
Views
804
Replies
5
Views
1,504
Replies
14
Views
6,003

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

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