The short answer

A fully qualified domain name (FQDN) spells out every label up to the root, for example www.example.com.. The final dot is the root, the empty label at the top of the tree. A relative name such as www is incomplete, and the software reading it adds a suffix: the zone origin in a zone file, or a search suffix on a computer. Most mistakes come from a full name written without its trailing dot in a place that treats it as relative, which turns mail.example.com into mail.example.com.example.com..

Hostname, domain name and FQDN

TermExampleWhat it means
LabelwwwOne part of a name, up to 63 octets. A whole name is at most 255 octets on the wire.
Domain nameexample.comAny node in the DNS tree and everything below it. It does not have to be registered or to hold records.
Hostnamewww.example.comA domain name used to name a host. Hostnames are limited to letters, digits and hyphens (RFC 952 and RFC 1123); other DNS names, such as _dmarc.example.com, are not.
FQDNwww.example.com.A name written all the way to the root. In everyday use the final dot is often left off, which is fine wherever the software assumes the name is complete.
Relative namewww or mail.euA name that needs a suffix added before it can be looked up.

Browsers, email addresses and most web forms treat what you type as complete, so example.com and example.com. reach the same place. Zone files, some provider dashboards and the resolver on your computer do not, and that is where the dot starts to matter.

Names in zone files: $ORIGIN, @ and the trailing dot

In a zone file (RFC 1035 master file format) any name without a trailing dot is relative, and the server appends the current $ORIGIN. The @ sign stands for the origin itself. If the file sets no $ORIGIN, the server uses the zone name it was configured with.

$ORIGIN example.com.
$TTL 3600
@        IN SOA  ns1.example.com. hostmaster.example.com. ( 2026111001 7200 900 1209600 300 )
@        IN NS   ns1.example.com.
@        IN NS   ns2.example.net.
@        IN MX   10 mail
www      IN A    192.0.2.10
mail     IN A    192.0.2.25
shop     IN CNAME shops.example.net.
api      IN CNAME www
As writtenWhat the server reads
@example.com.
wwwwww.example.com.
10 mail (MX data)10 mail.example.com.: relative names in record data are expanded too
shops.example.net.Used as is, because it ends in a dot
api IN CNAME wwwapi.example.com. is an alias for www.example.com.

A later $ORIGIN line changes the suffix for every line after it, which is a common way to write records for a subdomain. Relative $ORIGIN values are themselves appended to the previous origin, so $ORIGIN eu after $ORIGIN example.com. means eu.example.com..

The doubled-domain mistake

The most common slip is writing a full name without its trailing dot in a field that is relative:

WrittenBecomesSymptom
@ IN MX 10 mail.example.commail.example.com.example.com.Mail bounces or queues because the MX target does not exist
www IN CNAME shops.example.netshops.example.net.example.com.The site fails with NXDOMAIN, or reaches a wildcard record by accident
@ IN NS ns2.example.netns2.example.net.example.com.The zone lists a nameserver that does not exist, which looks like lame delegation
Owner www.example.com in the example.com zonewww.example.com.example.com.The record exists, under a name nobody queries

Provider dashboards differ. Many ask only for the part before the zone name (the host field) and add the zone for you, so typing www.example.com there creates the doubled name. Others accept either form and strip the zone name if you include it. Read the preview the dashboard shows before saving, and check the result with a lookup.

Relative names on computers: search suffixes

Resolvers on computers also complete relative names. A computer joined to a network may have a search list such as corp.example.com. Type intranet and the resolver tries intranet.corp.example.com before (or instead of) the bare name.

  • Linux reads search and options ndots:n in /etc/resolv.conf. A name with fewer than n dots (default 1) is tried with each suffix first. Kubernetes pods default to ndots:5, so an external name like api.example.com is first tried with every cluster suffix.
  • Windows uses the primary DNS suffix and the connection-specific suffixes, set by Group Policy or DHCP (option 15 or 119).
  • macOS shows its search domains under the network settings and in scutil --dns.

Ending a name with a dot tells the resolver not to try any suffix, which is useful when testing. Search suffixes are also a privacy and security concern: a laptop on a public network that tries intranet.corp.example.com leaks internal names, and a stray suffix can send lookups to a domain someone else controls.

Checking names yourself

CommandWhat it shows
dig +short example.com MXThe MX target as served. A doubled name in the answer means the record was written without its dot.
dig +noall +answer mail.example.com.example.com AConfirms whether a doubled name actually exists in the zone
dig +search intranetApplies the search list from resolv.conf, which dig does not do by default
Resolve-DnsName intranetWindows PowerShell lookup that uses the suffix list
Get-DnsClientGlobalSettingShows the Windows suffix search list
named-checkzone example.com example.com.zoneBIND's zone file check, which prints names after expansion with -D

How DNS Panopticon helps

Zone Analyzer reads a zone export in your browser and expands every relative name the way a DNS server would, so a record written as mail.example.com.example.com. shows up under that full name in the record list. It also handles exports that leave the final dot off names that are already complete. Domain Visualizer shows the names a live domain actually serves, which is a quick way to see where an MX or CNAME really points.

FAQ

Is example.com the same as example.com. with a dot?

For lookups from a browser or an email client, yes. The dot only changes things where software would otherwise treat the name as relative, such as a zone file, some DNS dashboards, or a computer with a search list.

Should I type the trailing dot in my DNS provider dashboard?

Only if the provider asks for it. Some dashboards want the full name with a dot in target fields, others add the dot themselves. Check the preview or the help text, then look the record up after saving.

Why does my record show up as www.example.com.example.com?

The owner name was entered as a full name in a field that is relative to the zone. Delete it and create the record with just www, or with the trailing dot if the field accepts full names.

What does the @ sign mean?

In zone files and most dashboards, @ stands for the zone apex, the origin itself, such as example.com.

Sources and further reading