Join our Newsletter — 33% off our NHI Course

What is the difference between computer name, hostname, and local hostname on macOS?

A computer name is the user-facing label shown to people. A hostname identifies the device on a network and is used in network communication and remote login. A local hostname, also called the Bonjour name, is used on the local network so nearby devices can discover and connect to the Mac.

How these names differ on macOS

The three labels describe different layers of how a Mac is identified. The computer name is the human-readable label you see in settings and sharing screens. The hostname is the network name used for communication and remote access. The local hostname is the Bonjour name used for discovery on the local network, so nearby devices can find the Mac without knowing its full network address.

A useful way to think about them is audience and scope. The computer name is for people, the hostname is for systems beyond the local machine, and the local hostname is for nearby devices on the same network segment. On macOS, these names can look similar, but they serve different discovery and connectivity paths.

They can also diverge in practice. A user may rename the computer for readability, while the hostname remains stable for network scripts or remote login. The local hostname is often adjusted by macOS to keep Bonjour discovery unique on the local network, which is why it may include a suffix or appear slightly different from the computer name.

Where each name is used

The computer name is the label shown in places like Sharing, AirDrop interfaces, and device lists. It is the most user-facing of the three and is meant to help people recognise the machine quickly.

The hostname is the identifier used when a Mac is addressed over a network. It matters for SSH, file sharing, and any service that needs a stable network identity. If you are configuring remote access or documenting a device for administrators, this is usually the name that matters most.

The local hostname is the Bonjour or mDNS name. It is designed for local discovery rather than routed network traffic, which makes it useful when devices need to discover each other automatically on a home or office network. If discovery fails, the issue is often local network visibility, not the computer name itself.

Why the distinction matters in daily administration

These names reduce confusion when a Mac must be found by people, by local discovery, and by remote tools. A mismatch between them is not inherently wrong, but it can make troubleshooting harder if teams assume the visible label is the same as the network identity.

For support and inventory work, the computer name should stay easy to recognise, while the hostname should remain predictable enough for scripts, documentation, and remote sessions. The local hostname is usually the least important for manual administration, but it is the one most likely to matter when another Mac, iPhone, or printer is trying to discover the device automatically.

In practice, the important question is not which label sounds most official, but which one the task depends on. Human recognition, network reachability, and local discovery are different problems, so changing one name does not always change the others in the way users expect.

Practitioner Guidance

What to verify: Before changing names on a managed Mac, confirm which name remote access, device inventory, and local discovery actually depend on. If an admin tool or script uses the hostname, changing only the computer name will not solve a connectivity issue.

Common mistake: Treating the visible computer name as the network identity. That often leads to confusion when SSH, sharing, or automation still refers to a different hostname.

What good looks like: The computer name is readable for users, the hostname is stable and documented for admins, and the local hostname remains unique enough for Bonjour discovery on the local network.

Practitioner takeaway: On macOS, rename for the audience you are serving, people, network tools, or local discovery, and avoid assuming that one label change automatically updates the others in a useful way.