Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

What is a host, and what is a hostname?

"Host" means slightly different things in networking, in web hosting and in virtualisation, and "hostname" adds a fourth. This guide pins down each meaning, shows the rules a valid hostname follows, and gives the exact steps to find or change the host name on a laptop, a Mac or a Linux server.

Short answer: In networking, a host is any device with an IP address that sends or receives data: a laptop, phone, server or VPS. A hostname is the label that identifies that host, such as web1. Add the domain and you get the fully qualified domain name (FQDN), such as web1.example.com. On Windows, Mac or Linux, type hostname in a terminal to see it.

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

What "host" means in different contexts
TermMeaningExample
Host (networking)Any device with an IP address that sends or receives dataA laptop on Wi-Fi, a VPS in Mumbai
ServerA host whose main job is answering requests from other hostsA web server, a database server
ClientA host that makes requests to a serverA browser on your phone
Web hostA company that provides server space for websites and appsA hosting provider selling cPanel hosting or a VPS
Virtualisation hostThe physical machine that runs virtual machinesA KVM node running many VPS guests
HostnameThe name given to one hostweb1, 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

How a hostname, a domain name and an FQDN relate
TermExampleWhat it identifies
Hostname (short name)web1One machine, unique only inside its own network
Domain nameexample.comA zone in DNS that you register and control
FQDNweb1.example.comOne host, unique on the whole internet
Website addresswww.example.comAlso 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:

Hostname rules and limits from the RFCs and vendor documentation
RuleLimitSource
Allowed charactersLetters a-z, digits 0-9 and the hyphen; dots only between labelsRFC 1123, Microsoft
First and last characterMust be a letter or digit; may not end with a hyphenRFC 1123, Microsoft
One labelUp to 63 bytesRFC 1035, Microsoft
Full FQDNUp to 255 bytesRFC 1035, Microsoft
Linux static hostnameUp to 64 characterssystemd hostnamectl manual
Windows computer (NetBIOS) nameUp to 15 charactersMicrosoft
CaseNot case-sensitive in DNS: Web1 and web1 are the same nameMicrosoft
UnderscoreNot 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
Where to find the host name on each operating system
SystemCommandSettings path
Windows 10 and 11hostname, ipconfig /all ("Host Name"), or $env:COMPUTERNAME in PowerShellSettings, System, About: "Device name"
macOSscutil --get LocalHostName and scutil --get ComputerNameSystem Settings, General, Sharing: "Local hostname"
Linux (systemd)hostnamectl or hostnameDesktop settings, About (varies by desktop)
Linux, full namehostname -f prints the FQDN-

Windows laptop

  1. Press the Windows key, type cmd and open Command Prompt.
  2. Type hostname and press Enter. The single line it prints is the computer name.
  3. 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:

The three places a server's name is set
WhereWhat it doesWho sets it
Hostname on the machine (hostnamectl)Shown in the prompt and logs; used by the server to describe itself, for example in mail headersYou, as root
Forward DNS (A / AAAA record)Lets the world turn web1.example.com into the server's IPYou, at your DNS provider
Reverse DNS (PTR record)Turns the IP back into a name; checked by mail servers and some logsWhoever 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

Common errors that involve a host name
MessageWhat it meansFix
sudo: unable to resolve host web1The machine's hostname is not listed in /etc/hostsAdd it on the 127.0.1.1 line
curl: (6) Could not resolve hostDNS returned no address for the nameCheck spelling and DNS with dig name +short
Browser shows ERR_NAME_NOT_RESOLVEDThe same failure, seen in ChromeCheck the record, then the local resolver
SSH warns the host key has changedThe name now points to a different server, or the server was rebuiltConfirm 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 )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is a host in simple words?

A host is any device on a network that has an IP address and sends or receives data, such as a laptop, phone, server or VPS. In web hosting, a host also means the company that rents you server space, and in virtualisation it means the physical machine that runs virtual machines.

What is the difference between a host and a server?

Every server is a host, but not every host is a server. A host is any networked device with an IP address. A server is a host whose main job is answering requests from other hosts, such as serving web pages or a database.

How do I find the host name of my laptop?

Open Command Prompt on Windows or Terminal on a Mac or Linux and type hostname. On Windows you can also look under Settings, System, About for the device name, and ipconfig /all shows it as Host Name. On a Mac, scutil --get LocalHostName shows the local network name.

What is the difference between a hostname and an FQDN?

A hostname is the short label for one machine, such as web1. The fully qualified domain name adds the domain, such as web1.example.com, which makes it unique on the internet. On Linux, hostname -f prints the FQDN.

Can a hostname contain an underscore or a space?

No. Host names may contain only letters, digits and hyphens, with dots separating labels, and must start and end with a letter or digit. Microsoft's naming rules list the underscore and spaces among disallowed characters for DNS host names.

Does changing the hostname change my DNS?

No. The hostname on the machine, the A record at your DNS provider and the reverse DNS (PTR) record for the IP are three separate settings. Change each one so they match, especially on a server that sends email.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.