A hostname is the name a computer or device uses on a network, so people and software can find it.
This guide is for anyone who has seen a name like "laptop-07" or "mail.example.com" and wondered what it is. You do not need to run a network to be affected: every laptop, phone, printer and server you use has one.
In short
- A hostname is a device's name on a network. A domain name is the wider family name it sits under. An IP address is the number the network really uses.
- A naming service called DNS turns names into numbers, so people and programs can use the easy name.
- Names can give away more than you mean them to, such as a person's name, a place or what a server does.
- A clear naming habit and an up to date list of devices make it easier to spot things that should not be there.
What you will learn
- Explain the difference between a hostname, a domain name and an IP address.
- Spot a hostname that gives away too much.
- Check that the devices on your network appear on a list with an owner.
- Device name (hostname)
- the name one computer or device uses on a network.
- Network address (IP address)
- the number the network uses to deliver traffic to a device.
- Name lookup service (DNS)
- the system that turns a name into an address.
What is a hostname?
Think of the name on a house in a street. The postman uses the street and number. People find it easier to say "Rose Cottage". A hostname is the "Rose Cottage" of a computer.
On a network, devices really find each other by number. That number is the IP address. The hostname is a friendly label on top of it. A name like "printer-2" is easier to remember than a string of numbers.
A hostname often sits inside a bigger name. In "printer-2.office.example.com", the first part is the hostname. The rest is the domain name, the family name the device belongs to. The whole thing is called a fully qualified domain name, or FQDN, which means the complete name with nothing left out.
Where the comparison stops working: a house name rarely changes and is not secret. A device can change its name at any time, and a name can quietly tell outsiders who owns the device or what it does.
Why does it matter?
Names are how people and software find things. A careless name can give clues to an attacker. A device with no known name or owner can sit unnoticed on a network. The UK's national cyber security agency advises keeping a list of devices and recording who is responsible for each one[7].
If you run a small business
What could happen: a device nobody recognises joins your office network, and nobody can say whose it is.
Check this: ask whoever looks after your IT for a list of devices and their names.
If you are new to IT work
What could happen: you name a test server "payroll-db-old", and the name tells anyone who sees it what is inside.
Check this: follow your team's naming rule, and ask if there is none.
If your team runs apps and AI agents
What could happen: software connects to services by name. If a name points to the wrong place, the software may send its secrets there.
Check this: find out who can change the names your apps rely on.
What does it look like?
Example only. All values are made up.
# device list for a small office (made up) Name Address Owner laptop-07.office.example.com 192.0.2.17 Sales (1) printer-2.office.example.com 192.0.2.30 Office (2) janes-laptop-home 192.0.2.44 ? (3) payroll-db-old.office.example.com 192.0.2.50 ? (4) vpn.example.com 198.51.100.8 IT (5)
- A plain name with a number. It shows the type of device, not who uses it.
- A printer. Printers are devices on the network too, and need a name and an owner.
- In a real file, this line would contain a personal device named after a person, with no owner recorded.
- A name that tells anyone who sees it what the server holds, and no owner.
- A public name. Anyone on the internet can look it up.
Why this is risky: two devices have no owner, so nobody may update them. Two names give away a person's name and what is stored.
The safer way: every device has an owner on the list, and names follow one simple rule that does not reveal people or contents.
How does it work?
- Each device is given a hostname when it is set up. On a home computer you often choose it. At work, IT may set it.
- Names follow rules. The internet's naming rules allow letters, digits and hyphens, and each part of a name can be up to 63 characters long[1][2]. Windows adds its own limits, such as 15 characters for an older style of computer name[3].
- When a person or program asks for a name, a lookup service called DNS finds the matching number. DNS is often called the phonebook of the internet[4].
- The device then connects to that number. In a web address, the hostname is the part that holds the domain name or IP address[5].
- Public names can be seen by others. Website certificates are digital ID cards that prove a site is genuine. They name the domains they cover and go into public logs that anyone can search[6].

A worked example
Zane Kowal runs a small design studio with six staff. A new client asks him to fill in a short security form. One question asks for a list of the devices on his network.
Zane opens his router's admin page, the settings screen of the box that connects the office to the internet. It shows a list of connected devices by name. Most make sense: "studio-mac-1" to "studio-mac-4", and "printer-2".
Two names do not. One is "galaxy-tab". Nobody in the studio owns a tablet like that. The other is "nas-backup-old", an old storage box that he thought had been unplugged.
He asks the team. The tablet belongs to a visitor who was given the office Wi-Fi password months ago. The storage box is still running in a cupboard, with old client files on it.
Zane takes three steps. He changes the Wi-Fi password and sets up a separate guest network for visitors. He copies what he needs from the old storage box, then wipes it and switches it off. He starts a simple list with each device, its name, its owner and when it was last checked.
He also agrees a naming rule: "studio-", then the type, then a number. Names do not include people's names or what is stored on the device.
A month later he checks the router list against his own list. Every name matches an owner. The client form now takes him ten minutes.
Myths and mistakes
| What people think | What is true |
|---|---|
| A hostname and a domain name are the same thing. | The hostname names one device. The domain name is the wider family it sits under. |
| Names inside the office are private. | Names can show up in public records, such as certificate logs, if they are used for public services. |
| A device's name proves what it is. | Anyone can name a device anything. Check the owner and the device, not just the label. |
| Fun or personal names are harmless. | Names with people, places or contents give outsiders free clues. Use a plain rule. |
| If it has a name, someone must be looking after it. | Old devices keep their names long after people forget them. Record an owner for each one. |
What can I do this week?
- Look at the list of connected devices on your home or office router.
- Match each name to a person or a purpose, and ask about any you cannot match.
- Rename devices that show a person's full name or what they store.
- Start a simple list of devices with a name, an owner and a date checked.
- Agree one short naming rule with your team.
Checklist
- I can explain the difference between a hostname, a domain name and an IP address.
- I have checked the list of devices on my router.
- Every device name on my network matches a known owner.
- Device names do not include people's names or what is stored on them.
- We have a written naming rule, even a one-line one.
- Old devices are wiped and removed from the list when they are retired.
- I know who can change the names our apps and websites use.
Common questions
How do I find my computer's hostname?
It is usually in your device settings, often under "About" or a section on the computer's name. Your home or office router also lists connected devices by name. If you are at work and are unsure, ask your IT team, as they may set names for you.
Is a hostname the same as an IP address?
No. The hostname is the name, and the IP address is the number. The network delivers traffic by number. A lookup service called DNS turns names into numbers, so people and programs can use the easier name and still reach the right device.
Can someone hack me just by knowing my hostname?
Not on its own. A name is a clue, not a key. But a name that shows a person, a role or what a server holds helps an attacker choose a target. That is why plain names and an owner for every device are worth the small effort.
What is a subdomain?
A subdomain is a name made by adding a part to the front of a domain name. In "shop.example.com", "shop" is added to "example.com". Organisations use subdomains for different services. Each one should have an owner, so it is not forgotten when the service closes.
Why do apps and AI agents care about hostnames?
Software reaches the services it uses by name. If a name is changed to point somewhere else, the software may connect there and send its data or secrets. Control over who can change names is part of keeping software identities safe.
Where next?
Ready for the detail? Read the practitioner guide: Asset Inventory and CMDB Security Guide. It goes further into discovery tools, ownership records and keeping a device inventory accurate over time.
Also useful:
- Asset Inventory for Beginners
- IP Addresses and Subnets for Beginners
- DNS Security for Beginners
- Networking Fundamentals for Beginners
Related NHI Mgmt Group resources: Hostname, Certificate Authorities for Beginners and Non-Human Identities for Beginners.
Key terms
- Hostname
- The name a computer or device uses on a network.
- Domain name
- A human-readable name for an internet resource, usually turned into an address by DNS.
- Fully qualified domain name
- The complete name of a host, including every part of the domain.
- IP address
- The number the network uses to send traffic to a device.
- DNS
- The naming system that turns domain names into IP addresses and other records.
- Subdomain
- A name made by adding a part to the front of a domain name.
- Asset inventory
- A managed list of the devices, systems and identities an organisation needs to look after.
Sources and further reading
- P. Mockapetris, "Domain Names: Concepts and Facilities" (RFC 1034), Internet Engineering Task Force, November 1987. https://www.rfc-editor.org/rfc/rfc1034 (accessed 2 Dec 2026).
- R. Braden (ed.), "Requirements for Internet Hosts: Application and Support" (RFC 1123), Internet Engineering Task Force, October 1989. https://www.rfc-editor.org/rfc/rfc1123 (accessed 2 Dec 2026).
- Microsoft, "Naming conventions in Active Directory for computers, domains, sites, and OUs", Microsoft Learn. https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/naming-conventions-for-computer-domain-site-ou (accessed 2 Dec 2026).
- Cloudflare, "What is DNS?", Cloudflare Learning Center. https://www.cloudflare.com/learning/dns/what-is-dns/ (accessed 2 Dec 2026).
- MDN Web Docs, "URL: hostname property", Mozilla. https://developer.mozilla.org/en-US/docs/Web/API/URL/hostname (accessed 2 Dec 2026).
- Certificate Transparency project, "How CT works". https://certificate.transparency.dev/howctworks/ (accessed 2 Dec 2026).
- National Cyber Security Centre (UK), "Asset management", 10 Steps to Cyber Security. https://www.ncsc.gov.uk/collection/10-steps/asset-management (accessed 2 Dec 2026).