Universal .local Addresses for Testing

When developing web applications I like to use FQDN when testing locally. Primarily because it more closely matches the deployed state of the application. Cookies have specific rules when sub-domains come into play and you're much more likely to catch any variances. Traditionally I'd set just edit the hosts file on my dev machine (at C:\Windows\System32\drivers\etc on most machines) like so:

127.0.0.1            xheo.local
127.0.0.1            www.xheo.local
127.0.0.1            secure.xheo.local

So now I can type http://www.xheo.local and access my local IIS or Visual Studio web server. When the development team expanded we had to do this on each machine. While not really that difficult to do, I was curious if there was a way to apply the change across the entire network. Since we recently added a Windows domain server to the network with it's built in DNS the change is simple. I can add a top-level .local domain to the forest and setup a wildcard host name to resolve to 127.0.0.1. It looks like this:

Now any machine on our network can type any .xheo.local address and it will resolve to their local machine. Sweet!

Related Articles

Published : Mar 25, 2009
Views : 12269

Subscribe Subscribe | Blog Home

Downloads

Tags

  • development
  • test