Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I was wondering the steps I can take to change the localhost name to a test development domain name like "" on Win7 x64 ? Currently, when my test website builds its assigned to but I want this to instead have a name like "" that is accessible on my local network ?

[and sure any Virtual PCs built on this local PC]

I think this is done via the hosts file but I am little unsure how to do this ? Would someone be able to assist ?


share|improve this question
you won't be able to affect the port through DNS, though there may be other options available, i don't know. at best, with DNS, you can do – cpbills May 19 '10 at 7:18
hi :) thanks for the response. any idea how i can do this ? – Tom May 19 '10 at 7:44

2 Answers 2

Simple answer: services served on are not reachable from external systems without some kind of redirector. The 127/8 subnet is the local host -- and every host has a local host subnet.

So you'll either need a port-redirection system which listens on your LAN IP and forwards traffic to the service, or you will have to figure out how to get your service to listen on your LAN IP. With the former, you can have the listener listen on port 80 of your LAN IP, thus letting people connect without the :81 specification, with the latter you'd either have the service run on port 80 directly or people will still have to use :81.

Either way, you can then add a DNS record (probably a CNAME) that refers requests to your system's name/IP.

Unless you are serving up the .dev domain, you can't call it; but you can call it websitedev.yourdomain.

share|improve this answer, as everybody already said, is the local network, the computer itself. If you want to have a name different from localhost, you can edit the hosts file:


There you can add/edit/delete all association between ips and names. Instead of using, you should use maybe a different ip, like the one assigned to your network card ( for example).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.