I had setup my hostname to raspi a few days ago, and I could access my web server fine via raspi.local, but it's suddenly stopped working, and I get 'This page is not available'.

A few things to note:

  • I can access it via the IP address of the Pi
  • /etc/hostname has my desired hostname in it
  • I have Avahi installed on my Pi
  • I have Bonjour installed on my Windows computer
  • hostname gives me my correct hostname

Could anyone please help me? It just suddenly stopped working - the only thing I've done from the time it was working and isn't is turn it off via sudo halt. I can't find any help on the internet, they all say to do the above!

  • Do you happen to have a monitor attached to see if anything got logged to the console? Have you tried to restart the Pi and check what's logged in /var/log/syslog? Dec 21, 2014 at 20:25
  • @HeatfanJohn Not connected to a monitor, but if necessary, It is possible. Doesn't look like there's an error in the log! Dec 21, 2014 at 23:14
  • Is the Pi still running but having network issues our is the Pi completely down and needs a reboot to become responsive again? Dec 21, 2014 at 23:17
  • @HeatfanJohn I connected a monitor to the pi and used Midori to browse to a website - it works. So the network itself seems to work, it's just the hostname that doesn't. A reboot does not fix the problem. I can use ssh, FTP, and access my web server via the IP address but not the host name Dec 21, 2014 at 23:43
  • This question is about name resolution. So please tell us about your name server.
    – bot47
    Dec 23, 2014 at 9:32

1 Answer 1


Since the IP address works but not the hostname, it looks like you are having trouble resolving the name of your Raspberry Pi. This may be the result of a stale cache after changing your hostname, but assuming you have a static IP address configured for your Raspberry Pi, you can add an entry to the hosts file on your PC to solve the problem. The entry is made up of an IP address and a hostname so in your case:    raspi

replace the 0's in the line above with the IP address of your Raspberry Pi.

Full details of where the hosts file is located and how to edit it can be found here.

You can verify the resolution of a host to IP address by entering the following command at the Windows command line.

nslookup raspi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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