locked
Optionally resolve DNS on the machine to IIS web site mapped hosts on the machine to eliminate manual hosts file tweak to 127.0.0.1. RRS feed

  • Question

  • User-1927205511 posted

    The IIS and Windows teams should work together to optionally enable the Windows DNS client to check for IIS website host names on the local machine and return the loopback adapter on a hostname match before querying the DNS server. That is to say, the addition of a web site should optionally have the same net effect of adding to C:\Windows\System32\drivers\etc\hosts:

    127.0.0.1   websitename.domain.com

    When troubleshooting an app on a web farm / load balancer, such as when retrieving detailed error information which is only retrievable from the server desktop as localhost as the details are filtered on local client access, it is an arduous process to open up the hosts file to point the hostname to 127.0.0.1 so that web browser queries on the machine don't map out to the load balancer. This need is typical for real-world environments. 

    Friday, August 7, 2015 2:09 PM

All replies

  • User-736483138 posted

    There is a DNS zone, localtest.me, used specifically for this. Check out this blog post about this domain.

    Friday, July 14, 2017 7:57 PM