I'm setting up a Raspberry Pi for the first time, and have been SSHing into it on a Mac on the same network like so:

ssh pi@raspberrypi.local

However on my Windows 10 box (also on the same network) this hostname does not resolve. I've tried ipconfig /flushdns, nslookup raspberrypi.local and similar commands to get my Windows machine to see the Raspberry Pi but to no avail. Since it's working on my Mac it doesn't seem like a router issue.

What can I do to connect to my Pi by hostname on Windows?


How To Geek has a good article that covers this issue. In a nutshell .local domains are self-reported by each host (via Multicast DNS), and other machines on the network have to listen for them. Windows comes with such a service (LLMNR) however it's non-standard and therefore doesn't work terribly well. Instead you should install Apple's Bonjour service (install link). Once Bonjour is installed you'll be able to connect to your Pi on Windows via .local hostnames.

Modern Raspbian versions should come with Avahi to provide mDNS. If it's not working make sure avahi-daemon is installed and running on your Pi; if it's not run the following to install it:

sudo apt-get install avahi-daemon
| improve this answer | |
  • Wouldn't changing the .local part into .int or .home work around this issue? – Ismael Miguel Apr 4 '16 at 8:30
  • 1
    @ismael - no, the tld is not the issue, it is Windows 10 not knowing about the device...the .local is setup to work with the local network, a different tld is going to work worse/need more setup in my experience. – DrCord Apr 5 '16 at 19:21
  • In my experience, editing the hosts file will work. I use that for a badly setup server. (I've set it up like that due to time constraints and because it is simply to test some code before deploying). So far, always worked for me. – Ismael Miguel Apr 5 '16 at 19:35
  • 1
    @IsmaelMiguel editing the hosts file works, but it's not a very robust solution. Every time a machine is allocated a new IP you need to edit the file, and if you have multiple machines you try to connect from you need to keep multiple host files in sync. mDNS does all that for you. – dimo414 Apr 5 '16 at 21:43
  • With mDNS/Bonjour/Avahi, you should never change the TLD..local is the official one specified in the RFCs, and many devices (such as many printers) cannot even be reconfigured for another TLD. Also, .local is guaranteed to never be assigned as an official TLD (although it was already widely used for Active Directory domains when mDNS was codified). .home is virtually guaranteed to cause conflicts. – user87363 Jun 10 '18 at 4:26

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