ipdetecto.com logo
ipdetecto.com
My IPSpeed
Knowledge Hub
HomeKnowledge HubHostname Vs Domain Name Fqdn
© 2026 ipdetecto.com
support@ipdetecto.comAboutContactPrivacyTermsllms.txt
Basics
5 MIN READ
Mar 10, 2025

Hostname vs Domain Name vs FQDN: What Is the Difference?

Hostname, domain name, and FQDN are three distinct concepts that are often confused. Learn exactly what each means, how they relate to each other, and how DNS resolves them.

Hostname, Domain Name, and FQDN: Three Different Things

These three terms describe different parts of a network address hierarchy. They are frequently confused because they overlap in casual usage, but each has a precise technical meaning:

  • Hostname — the name of a specific device or service
  • Domain name — the name of an organization or zone in DNS
  • FQDN — the complete, unambiguous address combining hostname + domain

Think of it like a mailing address: the hostname is the person's name, the domain is the street and city, and the FQDN is the complete address needed to deliver a letter anywhere in the world.

What Is a Hostname?

A hostname is the label assigned to a specific device or network service within a local network or domain. It uniquely identifies one machine within its scope.

Examples of hostnames:

  • www — the web server
  • mail — the mail server
  • ftp — an FTP server
  • api — an API server
  • DESKTOP-AB1234 — a Windows computer
  • johns-macbook — a laptop on a home network

Hostnames must follow DNS label rules: letters, digits, and hyphens only; no underscores (though common in practice); max 63 characters per label; case-insensitive.

On Linux, you can see or set your machine's hostname with:

hostname              # View current hostname
hostnamectl set-hostname newname  # Set hostname (systemd)

On Windows: hostname in Command Prompt, or via System Properties.

What Is a Domain Name?

A domain name identifies an organization or zone in the global DNS hierarchy. Domain names are structured hierarchically, read right to left from most general to most specific:

  • Root domain: The invisible dot at the end (e.g., .)
  • Top-level domain (TLD): .com, .org, .net, .uk, .io
  • Second-level domain: google, amazon, cloudflare
  • Subdomain: www, mail, api, dev

The "domain name" you buy from a registrar (like google.com or yourcompany.io) is technically the second-level domain + TLD. Subdomains (like www.yourcompany.io) are created within your domain by adding DNS records.

What Is an FQDN (Fully Qualified Domain Name)?

An FQDN (Fully Qualified Domain Name) is the complete, absolute DNS name that uniquely identifies a host anywhere on the internet. It includes every label from the hostname all the way to the root:

www.google.com.
│   │       │  └── Root (trailing dot, usually omitted)
│   │       └──── TLD (.com)
│   └──────────── Second-level domain (google)
└──────────────── Hostname / subdomain (www)

A true FQDN ends with a trailing dot (e.g., www.google.com.) indicating the DNS root, though most tools and browsers omit it. Without the trailing dot, a name is technically a relative or partially qualified domain name — the DNS resolver may append a search domain before resolving it.

Hostname vs Domain Name: The Key Differences

PropertyHostnameDomain NameFQDN
ScopeSingle device or serviceEntire organization or zoneGlobal — unique across the whole internet
Examplewww, mail, apigoogle.com, yourcompany.iowww.google.com, mail.yourcompany.io
Resolves to IP?Only within local DNS scopeResolves to the domain's DNS zoneYes — globally resolvable to an IP via A/AAAA records
DNS recordUsed as the left part of A/CNAME recordsThe zone apex (@ record)The full record name in DNS
Who assigns itServer administrator / DHCPDomain registrar + DNS zone ownerCombination of both

Practical Examples

Example 1: Company email server

  • Hostname: mail
  • Domain: company.com
  • FQDN: mail.company.com
  • DNS A record: mail.company.com → 203.0.113.10

Example 2: Internal network device

  • Hostname: printer-floor2
  • Domain: corp.internal
  • FQDN: printer-floor2.corp.internal
  • This resolves only inside the corporate network — not on the public internet.

Example 3: Cloud server

  • Hostname: api
  • Domain: myapp.io
  • FQDN: api.myapp.io
  • DNS A record points to the server's public IP; SSL certificate issued for the FQDN.

Hostname vs IP Address

A hostname (or FQDN) is a human-readable name that DNS resolves to an IP address. The IP address is what routers actually use to forward packets — hostnames are never used at the network layer. DNS translates FQDN → IP so humans don't have to remember numeric addresses.

You can verify this with:

nslookup www.google.com     # Shows IP for the FQDN
ping www.google.com         # Resolves FQDN then pings the IP
host api.yourapp.io         # Simple DNS lookup

How DNS Resolution Uses FQDNs

When your browser visits www.google.com, the DNS resolver:

  1. Appends the trailing dot to get the true FQDN: www.google.com.
  2. Queries the root nameservers for the .com TLD.
  3. Queries the .com TLD nameservers for google.com.
  4. Queries Google's authoritative nameservers for the www A record.
  5. Returns the IP address to your browser, which then opens a TCP connection.

Frequently Asked Questions

Q.What is the difference between a hostname and a domain name?

A hostname identifies a specific device or service (e.g., 'www', 'mail', 'api'). A domain name identifies an entire organization or DNS zone (e.g., 'google.com'). The FQDN (Fully Qualified Domain Name) combines both: 'www.google.com' where 'www' is the hostname and 'google.com' is the domain. The hostname identifies one machine; the domain name identifies who owns it.

Q.What is the difference between a hostname and an FQDN?

A hostname is the short label of a device within its local scope (e.g., 'webserver01'). An FQDN includes the full DNS hierarchy — hostname + domain + TLD — making it globally unique (e.g., 'webserver01.company.com'). A hostname alone may not resolve outside its local network because DNS needs the full FQDN to locate it globally.

Q.What is a Fully Qualified Domain Name (FQDN)?

An FQDN is the complete DNS address of a host, including all domain labels from the hostname to the DNS root. Example: 'mail.company.com.' (the trailing dot represents the root). FQDNs are used in DNS records, SSL certificates, and email server configuration (MX records point to FQDNs). An FQDN uniquely identifies one host anywhere on the internet.

Q.How do I find the hostname of my computer?

On Windows: open Command Prompt and run 'hostname'. On macOS/Linux: run 'hostname' in the terminal, or 'hostnamectl' on systemd systems. In Windows Settings: go to Settings > System > About and look for 'Device name'. The hostname shown is the local label; add your network's domain to form the FQDN.

Q.Is a domain name the same as a URL?

No. A URL (Uniform Resource Locator) is the full web address including protocol, FQDN, path, and query string — e.g., 'https://www.example.com/page?id=1'. The domain name is just 'example.com'. The FQDN within this URL is 'www.example.com'. A URL includes the FQDN as one component alongside the protocol and resource path.
TOPICS & TAGS
hostname vs domain namehostname and domain namedifference between hostname and fqdnwhat is hostnamefqdn vs hostnamefully qualified domain namewhat is fqdnhostname vs fqdndomain name vs hostnamehostname meaningdifference between hostname and domain nameip vs fqdnwhat is a hostname in networkinghostname domain fqdn hierarchy guideunderstanding fully qualified domain namestechnical difference hostname vs domainmailing address analogy for networkinglinux hostname command exampleswindows server fqdn configurationdns label rules and hostnamescommon hostnames for servers like wwwsecond level domain vs tld explainedrole of trailing dot in fqdn dnsresolving partially qualified domain namesnslookup and hostname resolutionssl certificate for fqdn best practiceshostname resolution scope local vs globalit basics for network administrators