Setting the hostname: FQDN or short name?

Better Stack Team
Updated on November 23, 2023

When setting the hostname for a server, you have the choice between using the Fully Qualified Domain Name (FQDN) or a short name.

  • Fully Qualified Domain Name (FQDN): This includes both the hostname and the domain name. For example, a FQDN might look like " ". It provides the complete hierarchy of the server's position in the DNS (Domain Name System) structure.
  • Short Name: This is just the hostname without the domain part. For instance, "server1" would be a short name.

Both FQDN and short names have their respective advantages and use cases:

  1. FQDN:
    • Helps in better identification and organization in complex network environments.
    • Ensures a unique identity by including the domain name.
    • Vital for network communication and resolution, providing more information and context within a larger network.
  2. Short Name:
    • Easier to remember and type, especially in local network environments.
    • Faster to type, so it's commonly used in internal networks where the full domain isn't necessary for local communications.
    • Works well within smaller, less complex networks.

The choice of whether to use the FQDN or short name often depends on your network setup, organizational preferences, and specific requirements. In many cases, it's common to use FQDNs in larger, more complex networks to ensure unique identification and to maintain better organization and clarity within the domain hierarchy. For smaller, local networks, administrators might choose to use shorter, simpler names for convenience.

It's worth noting that using a FQDN provides more flexibility, scalability, and adherence to best practices, especially if there's a possibility of the server interacting with systems outside the local network or if it's being used in a more complex network environment.

Make your mark

Join the writer's program

Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.

Write for us
Writer of the month
Marin Bezhanov
Marin is a software engineer and architect with a broad range of experience working...
Build on top of Better Stack

Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email.

or submit a pull request and help us build better products for everyone.

See the full list of amazing projects on github