What is a host?
A host is a computer or other device connected to a network that runs programs and exchanges data with other devices. RFC 1122, the internet standard on requirements for hosts, puts it simply: a host is "the ultimate consumer of communication services". Your laptop, your phone, a web server and a VPS are all hosts. Routers and switches mainly pass traffic along for others, so networking texts usually treat them separately, even though they also have addresses.
Outside networking, the word has two other common meanings that cause most of the confusion around "what is host" searches:
- A web host is a company that rents out server space so your website is reachable on the internet. Bigdomainhost is a web host in this sense.
- A virtualisation host is the physical server that runs a hypervisor such as KVM. The virtual machines on it, including VPS plans, are called guests.
What is a host in networking?
In a computer network, a host is an end point: something that has at least one IP address and either starts a conversation or answers one. The network carries packets between hosts. Each host is reachable by its IP address, and usually also by a name, the hostname, so people do not have to remember numbers.
A host can be a client, a server or both. When your laptop opens a website, the laptop is the client host and the machine serving the page is the server host. The same VPS can be a server for visitors and a client when it downloads updates. Our guide to what a server is covers the client-server model in more depth.
Host, server, client and web host: four meanings compared
| Term | Meaning | Example |
|---|---|---|
| Host (networking) | Any device with an IP address that sends or receives data | A laptop on Wi-Fi, a VPS in Mumbai |
| Server | A host whose main job is answering requests from other hosts | A web server, a database server |
| Client | A host that makes requests to a server | A browser on your phone |
| Web host | A company that provides server space for websites and apps | A hosting provider selling cPanel hosting or a VPS |
| Virtualisation host | The physical machine that runs virtual machines | A KVM node running many VPS guests |
| Hostname | The name given to one host | web1, DESKTOP-4K2L9QA |
What is a hostname?
A hostname is the human-readable label assigned to a host on a network. It appears in your terminal prompt, in log files and in network tools, and it lets other machines refer to the host without its IP address. Windows calls it the device name or computer name; Linux and macOS call it the hostname.
A hostname on its own, such as web1, is a single label. It only becomes globally unique when you add a domain to it. That longer form is the fully qualified domain name.
Hostname vs FQDN vs domain name
| Term | Example | What it identifies |
|---|---|---|
| Hostname (short name) | web1 | One machine, unique only inside its own network |
| Domain name | example.com | A zone in DNS that you register and control |
| FQDN | web1.example.com | One host, unique on the whole internet |
| Website address | www.example.com | Also an FQDN; www is just a conventional host label |
Setting a hostname on a machine does not create a DNS record. For web1.example.com to resolve on the internet, you add an A record (and AAAA for IPv6) for web1 in the DNS zone of example.com. Our DNS explainer covers record types and TTLs.
Hostname rules: characters and length
Hostnames follow rules first written in RFC 952 and relaxed by RFC 1123, which allowed a name to start with a digit. Microsoft's naming documentation and the systemd hostnamectl manual add their own limits on top:
| Rule | Limit | Source |
|---|---|---|
| Allowed characters | Letters a-z, digits 0-9 and the hyphen; dots only between labels | RFC 1123, Microsoft |
| First and last character | Must be a letter or digit; may not end with a hyphen | RFC 1123, Microsoft |
| One label | Up to 63 bytes | RFC 1035, Microsoft |
| Full FQDN | Up to 255 bytes | RFC 1035, Microsoft |
| Linux static hostname | Up to 64 characters | systemd hostnamectl manual |
| Windows computer (NetBIOS) name | Up to 15 characters | Microsoft |
| Case | Not case-sensitive in DNS: Web1 and web1 are the same name | Microsoft |
| Underscore | Not allowed in host names (it is reserved for labels like _sip._tcp in SRV records) | Microsoft |
In practice: keep it short, lowercase, letters, digits and hyphens only, and make it say what the machine does, such as db-mumbai-1 or tally-del.
How to find the host name on a laptop or PC
The quickest way on every desktop system is the same command. Open a terminal or Command Prompt and type:
hostname
| System | Command | Settings path |
|---|---|---|
| Windows 10 and 11 | hostname, ipconfig /all ("Host Name"), or $env:COMPUTERNAME in PowerShell | Settings, System, About: "Device name" |
| macOS | scutil --get LocalHostName and scutil --get ComputerName | System Settings, General, Sharing: "Local hostname" |
| Linux (systemd) | hostnamectl or hostname | Desktop settings, About (varies by desktop) |
| Linux, full name | hostname -f prints the FQDN | - |
Windows laptop
- Press the Windows key, type
cmdand open Command Prompt. - Type
hostnameand press Enter. The single line it prints is the computer name. - For more detail, run
ipconfig /all. "Host Name" is near the top, and "Primary Dns Suffix" shows the domain part if the PC is in a company domain.
Mac
A Mac has three names. ComputerName is the friendly name shown in Finder and AirDrop. LocalHostName is the Bonjour name used on the local network, shown in Sharing settings with .local on the end. HostName is the Unix hostname, often unset, in which case macOS falls back to the others. Check all three in Terminal:
scutil --get ComputerName
scutil --get LocalHostName
scutil --get HostName
Linux desktop or server
On any distribution with systemd, hostnamectl prints the static hostname along with the operating system and kernel. The systemd manual describes three names: the static hostname you set, a transient one received from the network that is used only when no valid static name is set, and a free-form pretty name for display.
How to change a hostname
Windows
Go to Settings, System, About and choose Rename this PC, or run this in PowerShell opened as administrator:
Rename-Computer -NewName "office-pc-02" -Restart
Windows limits the name to 15 characters, and Microsoft notes that a domain member's name cannot be all digits.
macOS
sudo scutil --set ComputerName "Studio Mac"
sudo scutil --set LocalHostName studio-mac
sudo scutil --set HostName studio-mac
Linux, including a VPS
sudo hostnamectl set-hostname web1
hostnamectl
Then add the same name to /etc/hosts on the 127.0.1.1 line (Debian and Ubuntu use this convention) so tools like sudo can resolve it without DNS:
127.0.1.1 web1.example.com web1
On cloud images, cloud-init may reset the name at boot. Our Ubuntu VPS initial setup guide shows the preserve_hostname: true setting that stops this.
Hostnames on a server: /etc/hosts, DNS and reverse DNS
A server's name lives in three separate places, and they do not update each other:
| Where | What it does | Who sets it |
|---|---|---|
Hostname on the machine (hostnamectl) | Shown in the prompt and logs; used by the server to describe itself, for example in mail headers | You, as root |
| Forward DNS (A / AAAA record) | Lets the world turn web1.example.com into the server's IP | You, at your DNS provider |
| Reverse DNS (PTR record) | Turns the IP back into a name; checked by mail servers and some logs | Whoever controls the IP address, usually the server provider |
When all three agree (the hostname is mail.example.com, its A record points at the IP, and the PTR for that IP returns mail.example.com), the setup is called forward-confirmed reverse DNS. Receiving mail servers commonly check this, so it matters most for a server that sends email. Outbound port 25 is a separate question, covered in why port 25 is closed.
To see the reverse DNS of any IP address:
dig -x 203.0.113.10 +short
nslookup 203.0.113.10
localhost and the hosts file
localhost is the hostname every machine uses for itself. RFC 6761 reserves it, and the names under it, for the loopback address: 127.0.0.1 in IPv4 and ::1 in IPv6. Traffic to localhost never leaves the machine, which is why a database or admin panel bound to 127.0.0.1 cannot be reached from the internet.
The hosts file is a small local table of names and addresses that the operating system checks before it asks DNS. It lives at /etc/hosts on Linux and macOS and at C:\Windows\System32\drivers\etc\hosts on Windows. A line such as 203.0.113.10 example.com www.example.com sends only your own computer to that IP, which is the safe way to preview a site on a new server before you change DNS. Our guide to migrating a website uses exactly this step.
What is the host in a URL?
Web addresses have a host too. In https://www.example.com:8443/login, the host is www.example.com: the part between the scheme and the port or path. Your browser resolves that host through DNS, connects to the IP it gets back, and also sends the name in the HTTP Host header. That header is how one server with one IP address can serve many websites: the web server reads it and picks the matching site. It is also why a site opened by IP address alone often shows a default page instead of the site you expected.
Hostname errors you may see
| Message | What it means | Fix |
|---|---|---|
sudo: unable to resolve host web1 | The machine's hostname is not listed in /etc/hosts | Add it on the 127.0.1.1 line |
curl: (6) Could not resolve host | DNS returned no address for the name | Check spelling and DNS with dig name +short |
| Browser shows ERR_NAME_NOT_RESOLVED | The same failure, seen in Chrome | Check the record, then the local resolver |
| SSH warns the host key has changed | The name now points to a different server, or the server was rebuilt | Confirm the change is expected, then remove the old key with ssh-keygen -R name |
Hostnames on your Bigdomainhost VPS
Every KVM VPS in Mumbai (BOM-1) or Delhi NCR (DEL-1), from ₹674 per 30 days, comes with a dedicated IPv4 address, an IPv6 /64 and reverse DNS you can set yourself. That means you can make all three names match: set the hostname with hostnamectl, add the A and AAAA records at your DNS provider, and set the PTR to the same FQDN.
If a name does not resolve the way you expect, message us on WhatsApp at +91 75994 50220 at any time, or call during IST working hours, and we will help you read the dig output.
This guide was written by the Bigdomainhost team with AI assistance; facts and commands were checked against the linked sources on 26 November 2026.
Sources (checked )
- IETF (RFC Editor): RFC 1122: Requirements for Internet Hosts - Communication Layers (definition of host)
- IETF (RFC Editor): RFC 1123: Requirements for Internet Hosts - Application and Support (host name syntax)
- IETF (RFC Editor): RFC 1035: Domain Names - Implementation and Specification (label and name lengths)
- IETF (RFC Editor): RFC 6761: Special-Use Domain Names (localhost)
- Microsoft Learn: Naming conventions for computers, domains, sites and OUs
- Microsoft Learn: Rename-Computer cmdlet
- systemd: hostnamectl manual
- Apple Support: Change your Mac's name or local hostname