# What is a hostname?
Source: https://vpsdime.com/knowledgebase/presales/what-is-a-hostname
Last reviewed: 2026-07-05
Summary: A hostname is the name a server calls itself, a label for the machine, not its address on the internet. This explains what a hostname actually does, how it differs from a domain name, what a fully qualified domain name (FQDN) is, and what to enter, if anything, in the Hostname field when you order a VPS.

## The short answer

A **hostname is the name a computer gives itself**. It's a label for the machine, the same way "work-laptop" might be the name of your laptop. It identifies the server to you and to the software running on it.

It is **not your website's address**. Visitors reach a server through a **domain name** and **DNS**, which are set up separately, and the hostname plays no part in that. Typing `www.example.com` into the Hostname field when you order doesn't register that domain, doesn't point it at your server, and doesn't make a website appear there. It just makes the machine call itself that.

And yes, a hostname is always included: the field on our order form is **optional**, and if you leave it blank we assign a sensible one automatically. You can change it later, any time, from inside the server.

## A name, not an address

Once your VPS is running, its hostname shows up in exactly the places you'd expect a name to:

- in your **shell prompt** when you're logged in (`root@myserver:~#`), which is how you tell three open terminal windows apart,
- in the server's own **logs**, so entries say which machine wrote them,
- in your **client area**, as the label on the service in your list.

That's the job. It's a name for your own benefit, so "the server" has something to be called. It doesn't have to be registered anywhere, it costs nothing, it takes effect instantly, and nobody on the internet needs to approve it, because nothing on the internet routes traffic by it.

A useful way to hold the distinction: the hostname is the name written on the machine; the domain name is the address people use to find it.

## Hostname vs domain name

A **domain name** (`example.com`) is a name you rent from a **registrar** for an annual fee. It lives in the public **DNS**, the internet's directory, where a record you create maps the name to your server's IP address. That mapping is what makes `example.com` reach your VPS, and it's the only thing that does.

Side by side:

| | Hostname | Domain name |
|---|---|---|
| What it is | The name a machine calls itself | A name registered in the public DNS |
| Who assigns it | You (or your provider) | A registrar, for an annual fee |
| Who can see it | You, your software, your logs | Everyone on the internet |
| Makes a website reachable? | No | Yes, once a DNS record points it at your server's IP |
| Has to be unique? | Only among your own machines | Globally |
| Cost | Free | A small yearly fee to the registrar |

The two get confused for a good reason: **the same text can be both**. It's normal, and good practice, to name a server `web1.example.com` *and* create a DNS record for `web1.example.com` pointing at it. When that's done, the machine's self-given name and its public address happen to match. But nothing enforces the match; they're two separate systems that you align by convention. A server named `web1.example.com` with no DNS record is unreachable by that name, and a DNS record works fine even if the server calls itself `potato`.

## The FQDN: where hostname and domain meet

A **fully qualified domain name (FQDN)** is the complete, unambiguous form of a name: a **host label plus the full domain** it belongs to. In `web1.example.com`:

- `web1` is the **short hostname**, the machine's own name,
- `example.com` is the **domain**,
- the whole string, `web1.example.com`, is the FQDN.

DNS names read right to left, from general to specific: `com` is the top-level domain, `example` the domain registered within it, `web1` a host within that. Each dot-separated part is a *label*, and labels follow simple rules: letters, digits, and hyphens, up to 63 characters per label and 253 for the whole name, case doesn't matter.

Why give a machine an FQDN instead of just `web1`? For a single hobby server it genuinely doesn't matter much. It starts to matter when other systems inspect your server's name: **mail is the classic case**, since receiving mail servers check that the name your server announces, its DNS record, and the reverse DNS on its IP all agree, and a bare one-word hostname fails that test. If you plan to send mail from the VPS, name it with an FQDN under a domain you own (a common choice is `mail.example.com`) and set the matching reverse DNS.

## What the Hostname field does when you order

When you [order a VPS](https://vpsdime.com/knowledgebase/presales/how-to-order-a-vps), the configuration page has a **Hostname** field. Here's precisely what it does and doesn't do:

- **It's optional, and automatic if skipped.** Leave it blank and we pick a hostname for you, so there's nothing you must prepare or buy beforehand. Every VPS ends up with one either way.
- **It sets the operating system's hostname** on your new server, and nothing else. You can enter a short name (`myserver`) or an FQDN (`web1.example.com`), whichever you prefer.
- **It doesn't touch the domain system at all.** Entering `www.example.com` doesn't register `example.com`, doesn't create DNS records, and doesn't make a website load at that address. It's harmless, the server will simply call itself that, but the website part is a separate job (next section).
- **On Windows VPS** the field is a **Label** instead: a friendly display name for the service in your client area. It doesn't name Windows itself.

If you're still deciding which VPS to order in the first place, that decision is covered in [Choosing the right VPS](https://vpsdime.com/knowledgebase/presales/choosing-the-right-vps).

## So how does a website get its name?

Three steps, and the hostname isn't one of them:

1. **Register the domain** at a registrar (Namecheap, Porkbun, Cloudflare, and many others). We don't sell domain names ourselves, any registrar works with our VPS.
2. **Point the domain at your VPS** by creating a DNS **A record** that maps the name to your server's IP. You can host the DNS at your registrar, at Cloudflare, or on our **free DNS Manager**, whichever suits you. The walkthrough is [Pointing your domain at your VPS](https://vpsdime.com/knowledgebase/getting-started/pointing-your-domain).
3. **Serve the site** with a web server on the VPS, covered step by step in [Hosting a website on your VPS](https://vpsdime.com/knowledgebase/getting-started/hosting-a-website).

Once step 2 is done, `www.example.com` reaches your server whatever its hostname is. Renaming the server to match your domain afterward is a nice finishing touch, not a requirement.

## Choosing a hostname, and changing it later

There's no wrong answer, but the conventions exist for a reason:

- **Keep it short and lowercase**, letters, digits, and hyphens. Name servers by role (`web1`, `db1`, `staging`) and the names stay meaningful as you add machines.
- **Use an FQDN under a domain you own** if the server will send mail, as explained above.
- **Don't use a domain you don't own** as the name. It works, but it's a small lie in your logs that will confuse you or a colleague later.

Changing it on a running Linux server takes one command and no reboot:

```
hostnamectl set-hostname web1.example.com
```

There's also a **Hostname** button on the VPS's [manage page](https://vpsdime.com/knowledgebase/client-area/services/managing-your-vps) in the client area that does the same thing, use whichever is handier.

Two reassurances, since this question comes up: a hostname change **doesn't affect the websites hosted on the server**. Websites answer to their domains through the web server's configuration, not to the machine's name, so renaming the machine doesn't touch them, unless something on the server was deliberately configured around the old name (an `/etc/hosts` entry, a mail server's `myhostname`, a script that reads the hostname), which is a quick check after renaming. And the change is instantly reversible: if anything acts up afterward, set the old name back with the same command.

So if you ordered with the auto-assigned name, or a name you've gone off, nothing is stuck. The hostname is the most easily changed setting on the whole server.

---

Questions before you order? You can [open a ticket](https://vpsdime.com/open-ticket/), and we typically reply within minutes.

## Related questions

- "Is the hostname on the order form used for my website, or is it just an internal name?"
- "Is a hostname included and assigned automatically when I buy a VPS?"
- "What should I enter in the Hostname field when ordering?"
- "What's the difference between a hostname and a domain name?"
- "What is an FQDN (fully qualified domain name)?"
- "If I set my hostname to www.mydomain.com, will my website work there?"
- "Do you sell or register domain names?"
- "Can I change my server's hostname later?"
- "Will changing my hostname break my website?"
