i’m tired of answer this question again and again: “why the dot? why oh why..”
Answer:
imagine we want to resolve the host “www.irssi.de”. our client has the following resolv.conf:
nameserver 192.168.0.1 search localdomain1.tld localdomain2.tld
if he tries to resolve “www.irssi.de”, it will try www.irssi.de first.
if this request fails it will try:
“www.irssi.de.localdomain1.tld” and “www.irssi.de.localdomain2.tld”
if all these requests fail it will report this to the user.
now we try the same with “www.irssi.de.”
now it will only try “www.irssi.de” and report the fail to the user.
addition from L :)
wildcards domains are another point: the admin of localdomain2.tld added the following line in his zone file:* IN A 192.168.0.2
the first 2 requests failed and now your client queries www.irssi.de.localdomain2.tld. the server will reply with
192.168.0.2.
now the user gets some local website but not www.irssi.de.
lets compare DNS tree with a filesystem: de/irssi/www vs. /de/irssi/www
for more get: http://www.oreilly.com./catalog/dns4/
Update 2005-12-29: As i got more than once a complain about the trailing dot in urls i would like to quote the RFC here:
“A host identified by a registered name is a sequence of characters usually intended for lookup within a locally defined host or service name registry, though the URI’s scheme-specific semantics may require that a specific registry (or fixed name table) be used instead. The most common name registry mechanism is the Domain Name System (DNS). A registered name intended for lookup in the DNS uses the syntax defined in Section 3.5 of [RFC1034] and Section 2.1 of [RFC1123]. Such a name consists of a sequence of domain labels separated by ”.”, each domain label starting and ending with an alphanumeric character and possibly also containing ”-” characters. The rightmost domain label of a fully qualified domain name in DNS may be followed by a single ”.” and should be if it is necessary to distinguish between the complete domain name and some local domain.“(http://www.w3.org/Addressing/ -> http://www.w3.org/Addressing/#rfc3986 -> http://www.gbiv.com/protocols/uri/rfc/rfc3986.html -> http://www.gbiv.com/protocols/uri/rfc/rfc3986.html#host)