FQDN

Also known as: Fully qualified domain name

On this page 7

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.

LabelLevelRole
webHost labelIdentifies a specific service or machine
shopSubdomainGroups hosts under a delegated branch
exampleRegistered domainThe name leased from a registrar
co.ukPublic suffixSecond-level and top-level domain pair
(empty)RootImplied by the trailing dot
Components of a sample FQDN

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.

RuleLimit or requirementPractical effect
Label length1 to 63 octetsLonger labels are rejected by DNS servers
Total length253 characters in text formEquals 255 octets on the wire
Hostname charactersLetters, digits and hyphensUnderscores reserved for service records
Hyphen positionNot first or last in a labelNames like -web are invalid hostnames
CaseCase-insensitive comparisonExample.COM equals example.com
Internationalized namesEncoded as PunycodeLabels begin with the xn-- prefix
Syntax constraints for an FQDN

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.

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.

ConceptExampleKey difference from an FQDN
FQDNdb1.corp.example.com.Complete name ending at the root
Hostnamedb1Only the leftmost label
Relative namedb1.corpCompleted with a search suffix
Domain nameexample.comMay name a zone, not a single host
URLhttps://db1.corp.example.com/appAdds scheme, path and other parts
IP address192.0.2.15Numeric address the FQDN resolves to
FQDN compared with related naming concepts

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.

MistakeSymptomCorrection
Missing trailing dot in a zone fileRecord appears under a doubled nameEnd absolute targets with a dot
Short name in a certificate requestBrowser shows a name mismatchIssue the certificate for the FQDN
Relying on search domains in productionLookups fail on other networksConfigure services with FQDNs
CNAME at the zone apexOther apex records breakUse address records or provider aliasing
Label longer than 63 charactersRegistration or query rejectedShorten or restructure the label
Typical FQDN errors and fixes

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.