0

I have a site hosted in IIS which I am able to access on the local machine using the IP address and port number eg http://114.12.34.23:86/ . What I would like instead is to access this using something like http://simplesite.dev and I would also like to be able to access this site from any other machine on the network. Is it possible to achieve this? And if so, how?

2 Answers 2

3

Yes! You just need to make it run on port 80 instead of 86, and then create a dns record pointing to it.

If you already have a DNS server, just create an A record in the existing zone, something like testdev.yourdomain.com . Creating arbitrary host names doesn't work across a network.

If it's a small number of machines, you can edit the %windir%\system32\drivers\etc\HOSTS file on all the machines, and put in an entry like

10.0.0.1 simplesite.dev

In order to map that name to that IP.

Fundamentally, you need to learn the fundamentals of name resolution. The rest is easy.

7
  • What if I am unable to create a DNS record pointing to the site? Can I access the site from other machines on the same network still?
    – user39739
    Jul 1, 2011 at 2:12
  • Yes. IIS is no different to other network applications in this regard - if you can get to the computer, you can use a website on it. If you can't create a DNS record pointing to the computer, not the site per se, you will need to manually edit the hosts files on every computer that needs to access it.
    – TristanK
    Jul 1, 2011 at 2:34
  • Every machine that needs to access it, except the server itself?
    – user39739
    Jul 1, 2011 at 2:43
  • @user39739, why are you unable to create a DNS record? You might notice that the hostnames resolve already, due to automatic DNS. For example, yourservername:86 may already work.
    – Brad
    Jul 1, 2011 at 2:46
  • 1
    You're starting backwards. You're telling IIS what names to respond to, but your client browser doesn't know what that name is meant to refer to. The client first looks up whatever name you type in, on its configured DNS servers. This is why the name must be in DNS. It's sounding like you can't configure a DNS name, and there's nobody you can ask to do it for you, meaning the overall answer to the question is "not really".
    – TristanK
    Jul 1, 2011 at 4:16
0

You can access the site from other hosts on the same network by typing http://114.12.34.23:86 in their browser address bar if those hosts also use an ip address in the 114.12.34.x netblock. I suspect though that your network doesn't use ip addresses in the 114.12.34.x netblock and that you're referring to your ISP assigned ip address. Where are you assigning the ip address? On your router or directly on your web server?

1
  • I am not assigning this IP address. It is the address I use to access the server itself after connecting to VPN.
    – user39739
    Jul 1, 2011 at 2:35

You must log in to answer this question.

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