Ah, yes.  There&#x27;s an additional mess not documented there, which is in the standard C library for DNS resolution.[1]  The semantics there are not quite what you might expect.<p>A fully qualified domain name has a dot at the end, as in &quot;example.com.&quot;.  Such a domain name must be looked up relative to the root.  For non fully qualified domains, &quot;resolver queries having fewer than ndots dots (default is 1) in them will be attempted using each component of the search path in turn until a match is found.&quot; The idea was that if you&#x27;re on &quot;foo.com&quot;, and you want to reach &quot;bar.com&quot;, you can just type &quot;bar&quot;.<p>This has some unexpected side effects if &quot;ndots&quot; is &gt; 1, which it is on some systems.  If you&#x27;re on &quot;foo.com&quot;, and you look up &quot;nosuchdomain.com&quot;, the resolver tries &quot;nosuchdomain.com.&quot; and gets a no-find. Then it tries &quot;nosuchdomain.com.com.&quot; There, it gets a find, because &quot;com.com&quot; has a resolver which reports a find for anything of the form &quot;*.com.com.&quot;, leading, of course, to a page of ads.<p>Then there&#x27;s the problem of single label top-level domains.  If you type one word into a browser, should it be looked up as a domain or fed to a search engine?  Browsers usually choose to search first.  But try putting a &quot;.&quot; after the query; browsers are inconsistent.<p>There are an insane number of TLDs now.[2]  Some of the one-word ccTLDs do resolve to an real IP address.  &quot;ac.&quot;, for example.  Some of the new one-word TLDs, such as &quot;gmail.&quot; and &quot;fairwinds.&quot; resolve to &quot;127.0.53.53&quot;, which is meaningless.  ICANN took the position that single-word TLDs should not resolve to IP addresses, and mostly, they don&#x27;t.<p>Then there&#x27;s the question of whether IPv6 addresses should be looked up first, second, or simultaneously.  And, if simultaneously, do you take the first response, or wait for both responses, one of which may time out and stall your DNS query?<p>[1] <a href="http:&#x2F;&#x2F;www.tldp.org&#x2F;LDP&#x2F;nag2&#x2F;x-087-2-resolv.library.html" rel="nofollow">http:&#x2F;&#x2F;www.tldp.org&#x2F;LDP&#x2F;nag2&#x2F;x-087-2-resolv.library.html</a>
[2] <a href="https:&#x2F;&#x2F;publicsuffix.org&#x2F;list&#x2F;public_suffix_list.dat" rel="nofollow">https:&#x2F;&#x2F;publicsuffix.org&#x2F;list&#x2F;public_suffix_list.dat</a>