Once you order VPS or a Dedicated server, the first thing you should do is setup hostname e.g. server.yourdomain.com In this article, we’ll go through a couple of short steps and learn how to setup a hostname on VPS and a Dedicated server.
Most of the hosting providers are deploying servers only with the server IP address without hostname, including Brickellhost.
Why hostname is important for VPS and Dedicated server?
Computers (VPS or Dedicated servers) can be found by others through the hostname, which enables data exchange within a network, for example. It’s very important to have your own hostname especially if you would like to use emails through your server, so your IP address doesn’t get blocked by Yahoo, Hotmail, Microsoft and many other email providers.
How to setup hostname for VPS and Dedicated server?
If you are using VPS or Dedicated server, make sure that you have full root access to your server and you are able to login through SSH terminal.
1) log in to your server using SSH
2) Enter the following command to check your hostname:
At this point probably you’ll see your server IP address set as a default hostname.
3) To change or set your own hostname type the following command:
hostnamectl set-hostname server.yourdomain.com
Make sure to replace server.yourdomain.com with your own domain name and server name. Once you’ve done step 3, you can type hostnamectl again to check your hostname. If your hostname is set with the name you chose server.yourdomain.com then you are done here.
That’s all. You have set your own hostname on your VPS or Dedicated server.