Changing your VPS Hostname on CrownPanel

Hello!

In this week’s feature highlight, we look at how to change the Hostname of your VPS on CrownPanel.

Before learning How to set the Hostname in CrownPanel, let us learn what is a Hostname.

A hostname is a domain name assigned to a host computer. For example, if Computer “A” had two computers on its network named “A1” and “A2,” the domain name “A1.abc.com” is connecting to the “A1” computer.
A hostname may have appended the name of a Domain Name System (DNS) domain, separated from the host-specific label by a period (“dot”) then the hostname is said to be a fully qualified domain name (FQDN).

OpenVZ Based VPS

OpenVZ VPSes pull the hostname from the config file which is updated when setting the hostname via our panel

Login to https://crownpanel.com/ and click on the “Manage” button beside the VPS you wish to edit the hostname for.

Next click on the “Hostname” listed beside the IP address,

This will open a new form where you can edit the hostname as you wish. Once the hostname is edited/changed, the VPS hostname is updated.

KVM Based VPS

Click on the “Manage” button beside the VPS you wish to edit the hostname for.

Next click on the “Hostname” listed beside the IP address,

This will open a new form where you can edit the hostname as you wish. Once the hostname is edited/changed, the VPS hostname is updated.

CentOS

How do I see the Host names?

hostnamectl

OR

hostnamectl status

How do I set the Host name? The new hostname can be set with the following command,

hostnamectl set-hostname YourHostname --static

To set Hostname as “myvps”, enter:

hostnamectl set-hostname myvps --static

To verify the new hostname, enter:

hostnamectl status

Ubuntu / Debian

Check your hostname status first:

hostnamectl status

Output shown will be something like:

[root@idroot ~]# hostnamectl status
Static hostname: vps.server.com
" 
"
"
Architecture: x86_64

To change the hostname to your preferred hostname, replace “YOUR_PREFERRED_HOSTNAME” with your hostname,

hostnamectl set-hostname YOUR_PREFERRED_HOSTNAME

Check your hostname status again in a new terminal:

hostnamectl status    
(Visited 33 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *