Local hostname not working without the trailing dot
The dot at the end is required to force a DNS lookup. Without it, Windows may try
first other methods such as NETBIOS or the hosts
file,
which it will not try if the dot is present.
When you put a dot, you are saying the host-name is fully qualified,
otherwise it will add your DNS suffix.
The final "dot" is always implied in DNS even if it's not specified.
From the DD-WRT forum article Can't resolve hostname but can resolve hostname. (with a . ):
This is typical DNS behavior.
The "trailing dot" signifies a fully qualified domain name (FQDN). Without the dot, the name you are trying to ping is ambiguous (having several possible meanings or interpretations).
You can help prevent the use of trailing dot by specifying a LAN domain of (for example) "local" in the router. Then release/renew DHCP on the client.
ping stan.local ping stan
So if your router's host-name would be router.local.
, and your DNS resolver
would have a search path of local
, when doing a lookup for router
the DNS client will automatically append the .local.
and then
successfully resolve the address.