I have a 2003 Server VM named Gemini, it has 2 IP addresses & I have a website on that box that listens on Is there anyway I can alias to dev.gemini. So in a browser on the network, users can type dev.geminiand they would be pointed to I'm not sure if I'm asking the right question. Is there a DNS or HOST thing I can do. Any links would be helpful.

Thanks, ~ck

4 Answers 4


To handle port-remapping, you need a reverse proxy. Configuration will depend on which one you use, but it can look at the host header of the request and then forward to the correct server and port.


if you put dev.gemini in your hosts file users will be able to access it by typing dev.gemini:81


This is something you do on the host, not with DNS.

DNS points a name to an IP. So you can point to dev.gemini.

In order to have a web request normally bound to port 80 automatically go to port 81, you can do it as simple as a META HTTP redirect in the index.html of a web server listening on port 80 which redirects to port 81.

<META http-equiv="refresh" content="5;URL=http://dev.gemini:81/">

Then any request to dev.gemini would redirect to dev.gemini:81. Users would see that in their URL/address bar but it would work. It wouldn't redirect dev.gemini/something to dev.gemini:81/something. You could do that with more sophisticated URL rewriting rules within the web server. IIS has ways to do this, I'm sure. I know it's far easier with Apache.

  • Ya, but I imagine if the person is using 80 it is because something is already using it ... if not, better to make it listen on 80? Aug 18, 2009 at 17:51
  • 1
    Ideally he should just use the virtual server feature of IIS so that requests to www.gemini and dev.gemini can live on the same IP and port but have different virtual websites. Aug 18, 2009 at 18:08

You can alias the IP to a hostname in the user's C:\WINDOWS\system32\drivers\etc\host file like:    dev.gemini

You can not however change the port with the hosts file. DNS has nothing to do with ports, it name to IP mapping only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.