I have a Windows machine running EasyPHP which hosts my website.

It is on a wireless network which is not connected to the Internet but is in a public place.

It is possible to connect to the website by entering the IP address of the server in the browser of a client but I wish to do it via a domain name, i.e. mysite.local instead of

As the users will largely be members of the public with smartphones I cannot edit their hosts file.

Do I need to run a DNS server to access this one site by name?

Or is there a simple solution?

  • Is the problem that the clients cannot use or remember the IP address? A proxy configuration (PAC) for the phone could work, but this is something that the clients need to actively set on their phones.
    – slhck
    Commented Nov 22, 2013 at 9:05
  • Yes its that a site name is easier to enter a browser bar than a string of numbers, dots and slashes. I want it to be as accessible as possible. Hence no messing with settings. Commented Nov 22, 2013 at 9:30
  • Just curious... does your network not provide DNS already in the form of your router? Then the visitors (which get their ip and gateway AND DNS from that router) might be able to reach your website by going to http://your_computer_name.local. You can even change your computer name to mysite to make http://mysite.local work.
    – Rik
    Commented Nov 22, 2013 at 22:41

1 Answer 1


Yes, you need a DNS server of some sort. Some Wi-Fi routers have DNS service built in. What are you using as the DHCP server on this network? Maybe you can run DNS service on that same box. Regardless, you'll want to configure your DHCP server to tell clients about your DNS server when they get their IP address leases via DHCP.

If this is like some kind of art gallery installation or something, where this is THE ONLY web server people need to get to from this network, then you could consider setting your web server as the "captive portal" on your network. If you've ever joined a public or commercial Wi-Fi network and had it redirect all your web requests to their own web-based login screen, then you know what a captive portal is. You could use that functionality to force everyone to your website. There's no requirement that your website actually give them a way to log onto "the rest of the network", so you can just leverage the captive-portal-redirect functionality to force people to your website.

I believe you can do this when running aftermarket firmware distros like OpenWrt on your Wi-Fi router. Otherwise you might need an enterprise-class or public-access-class Wi-Fi router in order to get that kind of functionality.

Here's why you can't do hostname-to-IP-address-mappings without a DNS server:

The IETF (the Internet standards body that publishes RFCs) has one method of making ".local" domains work without a DNS server; it's called ZeroConf or "IETF Zero Configuration Networking", and Apple's Bonjour is one implementation of it. Avahi for Linux is another.

Unfortunately, Microsoft has a different, incompatible thing called LLMNR for making ".local" domains work without a DNS server. Microsoft's "Windows Zero Configuration" is a whole separate thing, but very confusingly named, especially since both can apply to Wi-Fi networks.

I have no idea the current state of Android with this respect. I don't know if Android devices run Avahi or any kind of IETF ZeroConf daemon by default.

So there's really no local-network, serverless hostname-to-IP-address-lookup standard that's guaranteed to work out of the box across all browsers in all personal computer and smartphone/tablet OSes.

  • You can put a DNS service on a computer on the private lan and have the router/gateway/firewall use that/offer that as the primary when assigning an IP address (?). Not sure about precedence when there are multiple adapters etc., and in the OP's case, the users must actively connect to the LAN: those who don't might get redirected via "DNS fail > websearch redirect" as some ISPs are wont to do.
    – horatio
    Commented Nov 22, 2013 at 22:10
  • Thanks. I installed maradns and that seems to work fine. I agree about the captive portal idea. My router doesn't support Open WRT but I'm looking for a software solution Commented Nov 23, 2013 at 13:34

You must log in to answer this question.

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