Router – Default http redirection when domain name requested, with a flashed dd-wrt router

dnsmasqrouter

i'm setting up a testing environment in my office and configured a router flashed with dd-wrt to be my dns. I configured the domain name in the router to mydomain.com, through Setup >> Basic Setup >> Optional Settings. I also have a web server with the hostname configured to www through Services >> Services >> Services Management >> DHCP Server >> Static Leases, added an entry like this:

[MAC Address]      [Host Name] [IP Address]    [Client Lease Time]

##:##:##:##:##:6D  www         192.168.1.156   1440

(#'s are just placeholders)

then, In the Services >> Services >> Services Management >> DHCP Server >> DNSMasq >> Additional DNSMasq Options section, I wrote the following:

address=/www/192.168.1.156

I also configured port forwarding to redirect the traffic heading to port 80, to go to the same IP address (192.168.1.156). This way, I can access www.mydomain.com in any browser in my LAN, and the page I want will be served. How can I get mydomain.com to be mapped to the same IP? this is, How can i get my page to respond to a mydomain.com request the same as a www.mydomain.com request?

I have both DNSMasq and Local DNS services enabled.

Sorry for my noob question, and thanks in advance!

Best Answer

The address option will accept fully qualified domain names.

address=/mydomain.com/192.168.1.156
Related Topic