But are both www. and .com without the www in that hosts file?
Are you aware of how to use NSLOOKUP to test the name resolution? If not, google a little.
I have a Smart/RG modem/router for WAN access, and a second Netgear router behind it for the wired LAN. I host a website on a computer connected (wired) to the Netgear network.
All the computers connected through ethernet to the Netgear can connect to the site by domain name as I have configured the hosts files on each of them.
However, computers connected to the wifi on either the Smart/RG or the Netgear can't connect to www.mysite.com, but they can connect to subdomain.mysite.com. When they go to www.mysite.com, they get redirected to the Smart/RG's login page. If they go to mysite.com (without the www) it works correctly. I can't figure out why this is happening.
My ISP didn't provide me a manual for the Smart/RG modem, and their website doesn't let you download the manual. The router configuration has no built-in help, either.