An FQDN, or fully qualified domain name, is the complete and unambiguous name of a node in the Domain Name System (DNS), listing every label from the host itself up to the root of the DNS tree. A name such as mail.example.com. is fully qualified because it states the host label, the second-level domain, the top-level domain and, through the trailing dot, the root zone.
In DNS and across the wider Internet, an FQDN serves as an absolute address that resolves the same way regardless of where a query originates. It contrasts with a relative or partially qualified name such as mail, which a resolver must complete by appending a search domain before it can be looked up.
How an FQDN is structured
An FQDN is a sequence of labels separated by dots, read from the most specific on the left to the most general on the right. Each label identifies one level of the hierarchical namespace, and the empty label after the final dot represents the root. In everyday use the trailing dot is usually omitted, but DNS software treats it as the formal marker of absolute qualification.
The following table breaks down the FQDN web.shop.example.co.uk. into its components.
| Label | Level | Role |
|---|---|---|
| web | Host label | Identifies a specific service or machine |
| shop | Subdomain | Groups hosts under a delegated branch |
| example | Registered domain | The name leased from a registrar |
| co.uk | Public suffix | Second-level and top-level domain pair |
| (empty) | Root | Implied by the trailing dot |
The word “fully” matters because the same short label can exist in many zones. A host called api may appear under dozens of domains; only the complete FQDN tells a resolver which authoritative DNS servers hold the correct record.
Length limits and syntax rules
FQDN syntax is defined by the DNS specifications in RFC 1034 and RFC 1035, with the hostname rules refined by RFC 1123. These standards impose strict limits on length and characters, and violating them causes resolution failures or rejected certificates.
The table below lists the main constraints that apply to every fully qualified domain name.
| Rule | Limit or requirement | Practical effect |
|---|---|---|
| Label length | 1 to 63 octets | Longer labels are rejected by DNS servers |
| Total length | 253 characters in text form | Equals 255 octets on the wire |
| Hostname characters | Letters, digits and hyphens | Underscores reserved for service records |
| Hyphen position | Not first or last in a label | Names like -web are invalid hostnames |
| Case | Case-insensitive comparison | Example.COM equals example.com |
| Internationalized names | Encoded as Punycode | Labels begin with the xn-- prefix |
A subtle point concerns underscores. The DNS protocol itself accepts arbitrary octets, so names like _dmarc.example.com are legal DNS names used by TXT and SRV records. They are not, however, valid hostnames, and many applications reject them where a host is expected.
FQDN versus relative names and related concepts
The FQDN is often confused with neighboring concepts that describe only part of a name or a different layer of addressing. Precise vocabulary prevents configuration mistakes in zone files, certificates and firewall rules.
The following comparison shows how an FQDN differs from related terms.
| Concept | Example | Key difference from an FQDN |
|---|---|---|
| FQDN | db1.corp.example.com. | Complete name ending at the root |
| Hostname | db1 | Only the leftmost label |
| Relative name | db1.corp | Completed with a search suffix |
| Domain name | example.com | May name a zone, not a single host |
| URL | https://db1.corp.example.com/app | Adds scheme, path and other parts |
| IP address | 192.0.2.15 | Numeric address the FQDN resolves to |
In a DNS zone file, the distinction is explicit. A name written without a trailing dot is treated as relative to the zone origin, so writing mail.example.com inside the example.com zone produces mail.example.com.example.com., a classic error that only an absolute name with a final dot avoids.
How resolvers complete and use an FQDN
A stub resolver on a client decides whether a typed name is already fully qualified before sending queries. If the name ends with a dot, it is queried as is. Otherwise the resolver applies search domains from its configuration, governed on Unix-like systems by the ndots option in resolv.conf.
With the common default of ndots set to 1, any name containing at least one dot is first tried as absolute, and names without dots are tried with each search suffix. Container platforms such as Kubernetes often raise ndots to 5, which makes external lookups generate several failed queries before the correct name is tried.
Fully qualified names are also required in several other places across Internet infrastructure:
- TLS certificates, whose subject alternative names must list FQDNs or wildcard patterns.
- Mail exchanger records, where the MX target must be an FQDN that has an address record, not an alias.
- Reverse DNS lookup results, where PTR records return the FQDN of a host.
- Kerberos and Active Directory, which depend on consistent FQDNs for service principal names.
Common FQDN mistakes and their consequences
Most FQDN problems arise from inconsistent qualification between systems that expect absolute names and those that silently append suffixes. The table below lists frequent errors, their symptoms and corrections.
| Mistake | Symptom | Correction |
|---|---|---|
| Missing trailing dot in a zone file | Record appears under a doubled name | End absolute targets with a dot |
| Short name in a certificate request | Browser shows a name mismatch | Issue the certificate for the FQDN |
| Relying on search domains in production | Lookups fail on other networks | Configure services with FQDNs |
| CNAME at the zone apex | Other apex records break | Use address records or provider aliasing |
| Label longer than 63 characters | Registration or query rejected | Shorten or restructure the label |
A further operational risk is split-horizon DNS, where the same FQDN resolves to different addresses internally and externally. This is intentional, but it complicates troubleshooting, so administrators should always state which resolver answered when comparing results.
The idea in brief
An FQDN is the full address of a computer on the Internet, written in words instead of numbers. It works much like a complete postal address. Saying “apartment 4” is not enough, because many buildings have an apartment 4. Adding the street, city and country makes the address unique everywhere in the world.
In the same way, shop.example.com names one specific machine or service, and every part narrows the search. The key idea is that a full name always points to the same place, no matter which network a person uses to look it up.
A practical scenario
A systems administrator at a mid-sized engineering firm moves the company intranet to a new server. Employees in the office reach it by typing wiki, because their laptops append the search domain corp.example.com automatically. Remote staff connected through a different network, however, receive name resolution errors.
The administrator updates bookmarks, application settings and the internal documentation to use the FQDN wiki.corp.example.com, and requests a TLS certificate for exactly that name. In the zone file, the new CNAME target is written as srv-web07.corp.example.com. with a trailing dot to prevent accidental suffixing.
Within a day, remote employees can open the intranet without errors, browsers no longer show certificate mismatch warnings, and help desk tickets about the wiki drop to zero. The firm adopts a rule that every service is configured by FQDN, never by a short hostname.