What to put as hostname in VPS setup?

12,889

Solution 1

Like EEAA said, you can put in basically whatever you want.

That said, I do recommend having some kind of naming strategy for your hosts. Even if you only have a single VPS currently, it's not at all unheard of to grow systems horizontally over time, or to split services that were once co-located on a single server onto different servers.

Such a naming scheme can be as fancy or as boring as you like. You could use for example names of games (soccer, chess, ...), astronomical objects (proxima-centauri, saturn, ...), cities, species of animal, or just technical names that directly reflect the function of the particular host (such as ns2 or mail1). If the people you work for lack humor, I recommend purely technical names, or even a simple sequential scheme (to my knowledge, nobody ever got fired for naming a system server04).

I also strongly suggest putting the names under a domain name under your control. It's not actually a requirement, but doing so will save you from many headaches in the future. Then add whatever names you come up with to that domain name in DNS.

So if you have registered example.com then you might put in luna.example.com or chess.example.com or whatever else strikes your fancy.

You should strive to pick names that are unlikely to conflict with any public names you might reasonably want to use in the future which aren't guaranteed to be served by this particular host for as long as this particular host exists.

You can then configure the software running on that host to serve content for any host name of your choosing, and publish any host name of your choosing. Just because the physical (or in this case, virtual) host is known by an astronomical name doesn't mean you can't serve www.example.com off it.

Solution 2

Put whatever you want. The hostname of the server has nothing to do with what the names are of the services you'll be hosting on the server.

Share:
12,889

Related videos on Youtube

user412945
Author by

user412945

Updated on September 18, 2022

Comments

  • user412945
    user412945 over 1 year

    If my domain is example.com, what should I put as hostname in my VPS setup using Debian 8.7 Jessie? Is it www.example.com or example.com or example?

    • HBruijn
      HBruijn about 7 years
      There are some good arguments not to use the bare domain for your websites : serverfault.com/q/842842/37681 - but in general the hostname has very little bearing on the names used in the services you offer
  • Jacob Evans
    Jacob Evans about 7 years
    your fancy names can die in a fire :)