Hostname mapping to LAN IPs in Router?

There has been a somewhat similar question asked before here and here but they aren't the answers I am looking for.

Details: There is a website that is supposed to be deployed inside the network (LAN) it will only be accessible by LAN users. Now to access that network, the clients of that website have to go to its IP Address in LAN (which is static, so DHCP Server always gives the same IP to server machine). This is good so far, but what I want, is that instead of IP address, is there any other way, where the user can actually type a domain name, and the router forwards all the requests to that specific domain name to the IP address in LAN?

  • Are there any routers out there that support Hostname mapping to LAN IPs? (exact model please)

  • Is there any other way if the router does not support hostname mapping to LAN IP?

Unfeasible solution: Setup Local DNS server which will have the hostname mapping to that LAN IP, but the problem is that it is a restaurant, so different clients will be using it, so it is unfeasible to add LOCAL DNS Server address to each client machine. mDNS is also out of the question because of the support issues on Android browsers etc...


To my knowledge, it won't work through the "router". If a browser tries to determine the IP address for a website a request to resolve the domain name is sent to the DNS server, not to the router (unless the router also functions as a DNS server).

The only way I see is to set up the local DNS server. You have two options to do that:

  1. Set up some DNS server software manually (e.g. on the machine you use to run your Webserver anyway). You don't have to set up the DNS manually on each client, DCHP will do that for you.

  2. Use the DNS functionality on a router (DNSMasq) as NetworkKingPin suggested in his comment. End consumer routers with this feature let you map "hostnames" to IP addresses. But note: This is a DNS function, not a router function, this will be no different than just setting up your own DNS server.

Personally, I would suggest going with option 1. There are plenty of free and open-source DNS servers you can choose from. And it's really not that difficult to set it up - there a load of how-tos out on the internet for exactly your scenario. And you won't need to buy additional hardware (if your current router does not support DNSMasq).

Still, I'm curious to see if there is another solution out there as well (without the DNS server).

As specific product suggestions are out of scope on Superuser I won't name any specific devices but just search for something router and DNSMasq and you'll find plenty of options for various brands on the factory firmware or with an alternative firmware (Ubiquity, Linksys, Fritz!, AsusWRT, DD-WRT, etc.). If you have trouble finding one, just come back here and ask.

PS. I think you are thinking of the local HOST-IP mapping on each client, which has to be set up on each client manually. The address of the DNS server is provided via DHCP (unless it's configured manually).


Some routers allow the assigning of a name to a locally-defined device, to facilitate accessing that device. This is usually not a full DNS server, just a service that is offered by the router.

My router offers this service, the Orange Livebox. I just now tested it and it really works.

You will have to find your router. For example, the (costly) Linksys LRT214 Gigabit VPN Router has the DNS Local Database function.

A router based on the DD-WRT firmware can probably do the job, as can other Linux-based routers that have DNSMasq. See DNSMasq as DHCP server.