I can browse my server site using


which is inside my home network.But I am not able to browse using


I do not have dns server. I have edited /etc/hosts file to include hostname and ip. I can ping using hostname.   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 apple.myserver.com ball.myserver.com cat.myserver.com dog.myserver.com elep.myserver.com

Similar Issue Here.

  • 2
    Does it also not work if you explicitly say http://hostname:8080? Browsers have become worse in recognizing what is not a "omnibox" style search query. Commented Nov 27, 2015 at 13:00
  • @UlrichSchwarz It does not work. But when I use IP it works. I use mozilla firefox.
    – kinkajou
    Commented Dec 12, 2015 at 13:55

1 Answer 1


If you don't have DNS (so it is not registered and not resolving globally) then all you need is to add the same host entry in your PC/laptop in order to access to it via hostname.

  • I already havve it in /etc/hosts
    – kinkajou
    Commented Dec 12, 2015 at 13:51
  • apparently you have the wrong setup. pls post the output of "cat /etc/hosts && hostname -f " and also ping the hostname from the host itself.
    – ostendali
    Commented Dec 14, 2015 at 10:00
  • I have edited my question.
    – kinkajou
    Commented Dec 14, 2015 at 10:21
  • if pinging the hostname replies then it should work. you didn/t posted the output for hostname -f. also it is all on single machine right? I mean you have everything on one machine? because it sounds like that, otherwise pls be more specific if you are using 2 separate machines.
    – ostendali
    Commented Dec 14, 2015 at 10:37
  • I have many machines. virtual machines! hostname -f results one of hostname.
    – kinkajou
    Commented Dec 14, 2015 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .