> i think that a dot after the TLD is implicit, and signifies the root domain.
> i'll check up in the o'reilly book when i get home.
Yes. This is a DNS artifact.
A domain name without a trailing dot, technically, isn't
fully-qualified, and the resolver (library which converts names into IP
addresses) is at liberty to try to figure out what you mean. Usually,
there's some sort of heuristic like "if it has more than one dot in it,
assume it's a fully-qualified name and add a trailing dot, otherwise try
appending the current domain, or domain from the search path". These
are usually configurable using resolv.conf on systems (like Linux) with
the standard resolver.
Example - here's a resolv.conf similar to my one:
search tuatha.cs.tcd.ie tuatha.org cs.tcd.ie tcd.ie
Given a host "ogma" to search for, it counts the dots (zero), and checks
that against the value of "nodots" (2). As it's smaller, it won't try
"ogma." as an absolute name first, rather it takes the paths in the
"search" option one by one, and tries them - so, in order, it would
attempt to resolve:
ogma.tuatha.cs.tcd.ie. -- this succeeds, so the others aren't tried.
Given "salmon.maths", the same principle would apply. It contains one
dot, which is less than two, so it applies the search paths again:
salmon.maths.tcd.ie. -- this succeeds
Given "www.ibm.com", however, the number of dots is 2, which is *not*
smaller than the value of the "nodots" option, so it tries the absolute
www.ibm.com. -- success!
In most cases, the default value of "nodots" (1) is suitable - it means
that a hostname with no dots in it at all is checked against the search
path first (usually, the local domain), and a hostname with dots is
assumed to be an absolute (fully-qualified) name, and is tried as such
There's a further twist to the resolver thing, in that most systems can
tweak its operation using the nsswitch.conf file - the "hosts" entry in
this file tells the resolver the order in which methods are tried. EG :
hosts: files dns nis
... which means, "When looking up a hostname, first try for an exact
match in the /etc/hosts file. If that fails, try the DNS approach (as
outlined above). If that fails, try looking it up in the NIS (YP)
This has been your unscheduled braindump. We now return you to regular
Colm Buckley B.A. B.F. # colm at tuatha.orgcolm.buckley at tcd.iecolm at computer.org
Department of Computer Science # +353 87 2469146 # whois cb3765
Trinity College, Dublin 2, Ireland. # http://www.tuatha.org/~colm/
Friends may come and go, but enemies tend to accumulate.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!