Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to access services on other machines on my home network with just their hostname. In every browser, http://machine fails, but adding a period in http://machine./ works. Is there a way to avoid adding that extra period?

My setup is a router with DD-WRT w/ DNSmasq turned on, Win7 machines and several Ubuntu VMs. nslookup works fine with just hostname. Remote desktop works, but TightVNC needs the extra period. ssh needs the period. As I said, all my browsers need the extra period.

I'd prefer a solution that doesn't require manually maintaining the hosts file. Thanks.

share|improve this question

closed as off topic by Bryan, Magellan, Iain Nov 25 '12 at 15:16

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 0 down vote accepted

Windows doesn't lookup single-labelled domains using DNS by default, it uses WINS.

I posted about this somewhere else, but I can't find the answer now. The workaround I found was to add a single domain "." in the list of DNS suffix entries in the system's network settings.

share|improve this answer
This blog post describes it in more detail. Simple fix, everything works.… – projectshave Mar 28 '10 at 14:24

Does it have to be by name? Quick and easy to use IP address.

share|improve this answer
Yes, by name. I've got non-technical people in my house. And I can't remember more than 3 digits anyway. – projectshave Mar 26 '10 at 15:11
Why the downvote? How many total hosts are thre? – Dave M Mar 26 '10 at 18:30
I didn't downvote. – projectshave Mar 27 '10 at 4:14

Do you have a domain name? That's what the problem here is; the machine doesn't know where to look until you tell it that it's .nuthin

If not, dnsmasq has a couple of options. You can set up ALIAS (CNAME) records to point the name to the A record (which defaults to A.domain.tld, which is probably your problem). If your router has a "hosts" file, you can add the hosts there, and it should pick them up (make sure you do host host.domain.tld, so it'll know that host = host.domain.tld).

share|improve this answer

How about an automated way of editing/maintaining the hosts files.
Run this from cron on a linux host and distribute it to all machines automatically.
(or write the windows equivalent in powershell or whatever)

rm -rf /etc/;
arp -a | while read line ;do 
  echo $line | cut -d " " -f 1,2 | sed s'/(//'g | sed s'/)//'g >> /etc/;
# cat /etc/ >> /etc/hosts;
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.