FQDN Explained - Fully Qualified Domain Names in DNS
What an FQDN is, how it differs from a hostname or relative DNS name, why the trailing dot matters, and how FQDNs behave in zone files, terminals, and Kubernetes.
TL;DR
An FQDN is the complete DNS name for a host, written from the host label all the way to the DNS root. `www.example.com.` is fully qualified because nothing else needs to be appended to resolve it. The final dot represents the DNS root. Most dashboards and browsers hide that dot, but zone files, CLI tools, and some automation systems use it to distinguish absolute names from relative names.
What you'll learn
- Define FQDN in plain language
- Explain the trailing root dot and why most UIs hide it
- Distinguish hostnames, domain names, relative names, and FQDNs
- Avoid common FQDN mistakes in zone files, CLI tools, and Kubernetes
An FQDN is just a complete DNS name. It tells a resolver exactly where a name sits in the DNS tree, without relying on search paths, local defaults, or the current zone.
The strict form includes a trailing dot:
www.example.com.Most people write:
www.example.comBoth usually mean the same thing in a browser or DNS dashboard. The trailing dot matters when a system needs to know whether a name is absolute or relative.
What an FQDN Contains
DNS names are built from labels, read right to left:
www.example.com.
ā ā ā ā
ā ā ā root
ā ā top-level domain
ā domain
host/service labelFor www.example.com.:
wwwis the host or service label.exampleis the registered domain.comis the top-level domain..is the DNS root.
That final dot is not decoration. It means "stop here; this name is complete."
FQDN vs Hostname vs Domain
These terms get mixed together. The difference is small but useful:
| Term | Example | Meaning |
|---|---|---|
| Hostname | www | A local label for a host or service |
| Domain name | example.com | A domain in the DNS hierarchy |
| FQDN | www.example.com. | The complete, absolute DNS name |
| Relative name | www | A name that may be expanded under a zone or search suffix |
If you are editing a zone for example.com, the relative name www usually means www.example.com..
Why the Trailing Dot Matters
Zone files have an origin. If the origin is example.com., a name without a trailing dot can be treated as relative to that origin.
$ORIGIN example.com.
www 300 IN A 203.0.113.10
api 300 IN CNAME www
cdn 300 IN CNAME edge.provider.net.That expands to:
www.example.com. A 203.0.113.10
api.example.com. CNAME www.example.com.
cdn.example.com. CNAME edge.provider.net.Notice the difference:
wwwis relative, so the zone origin is appended.edge.provider.net.is absolute, so nothing is appended.
Forgetting the trailing dot is a classic CNAME/MX/SRV mistake:
mail 300 IN CNAME mail.provider.netIn many zone-file contexts that becomes:
mail.provider.net.example.com.That is almost never what you wanted.
How DNS Dashboards Handle FQDNs
Most managed DNS dashboards hide this complexity:
- You enter
www, and the dashboard stores it under the current zone. - You enter
www.example.com, and the dashboard can normalize it. - You enter a target like
mail.provider.net, and the dashboard knows whether the field expects a hostname, FQDN, or record value.
DNScale follows this managed-DNS approach. You normally do not type the trailing root dot in the dashboard. You still need to understand it when importing raw zone files or debugging with dig.
FQDNs in dig and nslookup
Command-line tools usually accept both forms:
dig www.example.com
dig www.example.com.The second command is explicit: query this absolute DNS name.
That can matter on systems with search domains. A laptop on a company network might try names like:
www.example.com.corp.example
www.example.com.office.example
www.example.comThe trailing dot skips that search behavior:
dig www.example.com.For normal public DNS checks, both forms usually return the same answer. For debugging search-suffix issues, the trailing dot is useful.
FQDNs in Kubernetes
Kubernetes makes this visible because pods often have resolver search paths such as:
default.svc.cluster.local
svc.cluster.local
cluster.localIf an application queries api.example.com, the resolver may try several internal names before the public one, depending on ndots settings.
Using an absolute name avoids those extra attempts:
api.example.com.This is not usually needed in application config, but it is useful when you are debugging slow lookups from inside a pod.
Common Mistakes
Treating every DNS name as an FQDN
Inside a zone editor, www is often the right input. You do not need to type www.example.com everywhere.
Forgetting the trailing dot in raw zone files
If the value points outside your zone, use the absolute form:
shop 300 IN CNAME shops.mycommerce.example.Adding the zone twice
If the dashboard asks for a record name under example.com, enter www, not www.example.com.example.com.
Confusing FQDNs with URLs
This is a URL:
https://www.example.com/pricingThis is the FQDN inside it:
www.example.com.DNS resolves names, not schemes, paths, query strings, or fragments.
Quick Reference
| Input | Fully qualified result |
|---|---|
@ in the example.com zone | example.com. |
www in the example.com zone | www.example.com. |
mail.eu in the example.com zone | mail.eu.example.com. |
mail.eu. in any zone | mail.eu. |
www.example.com in a browser | Usually treated as www.example.com. |
Related Reading
Frequently asked questions
- What does FQDN stand for?
- FQDN stands for fully qualified domain name. It means the complete DNS name, with every label needed to locate it in the DNS hierarchy.
- Is example.com an FQDN?
- In everyday use, yes. Strictly, the absolute FQDN is example.com. with a trailing dot. Browsers and DNS dashboards normally omit the trailing dot for readability.
- What is the difference between a hostname and an FQDN?
- A hostname is usually the local machine or service label, such as www or mail. An FQDN includes the full DNS path, such as www.example.com.
- Why do zone files use a trailing dot?
- The trailing dot tells the DNS server the name is absolute. Without it, many zone-file parsers treat the name as relative to the current zone and append the zone origin.
- Do I need to type the trailing dot in DNScale?
- No. DNScale normalizes DNS names for you in the dashboard and API. The trailing-dot rule matters most when reading raw zone files, using command-line tools, or writing automation that talks to lower-level DNS software.
- Why do Kubernetes DNS names sometimes behave strangely?
- Kubernetes resolvers often try search suffixes before treating a name as absolute. Using a trailing dot, such as api.example.com., can prevent extra internal lookups when you need the public DNS name exactly.
Related guides
Records
DNS A Record Explained ā What It Is and How to Use It
Learn what a DNS A record is, how it maps domain names to IPv4 addresses, and how to create, query, and troubleshoot A records with practical dig command examples.
Records
DNS AAAA Record Explained ā IPv6 Address Mapping
Learn what a DNS AAAA record is, how it maps domain names to IPv6 addresses, and how to set up dual-stack DNS with practical dig command examples.
Records
DNS CNAME Record Explained ā Aliases and Canonical Names
Learn how DNS CNAME records create domain aliases, when to use them over A records, and how to avoid common pitfalls like apex restrictions and CNAME chains.
Records
DNS MX Record Explained ā Mail Exchange Configuration
Learn how DNS MX records route email to mail servers, configure priority-based failover, and set up MX records for Google Workspace, Microsoft 365, and self-hosted mail.
Ready to manage your DNS with confidence?
DNScale provides anycast DNS hosting with a global network, real-time analytics, and an easy-to-use API.
Start free