2

I noticed sometimes '.' can be seen at the end of

myhost.mydomain

so it is

myhost.mydomain.
              ^^^

statement. Where should I use this '.' at the end? Currently in etc/hosts I don't use ending '.' Also not in local-host-names, and never, I think. Where and when it is needed?

please give some links if this can't be answered directly

3 Answers3

1

The trailing dot makes this a "Fully Qualified Domain Name" or FQDN. This is an absolute reference that fully specifies the entire path of the server in the DNS hierarchy.

Think of it as being the equivalent of a full path in Linux/BSD for a filename starting from root or "/".

You would use it when you do not want the OS/programs to be able to append the local system's domain to the end of it.

YLearn
  • 1,257
0

myhost.mydomain // here it is not FQDN: programs might append local system's domain to end of it

but:

myhost.mydomain. // here it is FQDN: programs can't append local system's domain to end of it
0

Where and when it is needed?

as other mentioned - when you want to have FQDN. Use it in etc/hosts file