title: IIS 10 Site Bindings wildcard development machine
body: <p>I have successfully setup IIS on my local development machine (dev branch - setup as localdev.me) but when I went to setup another branch (hotfix - setup as localhotfix.me) I am running into issues. The issues are due to the way the site is setup. The subdomain of the url is used to determine which Database to connect to. So going to host.localdev.me will connect to the host database. So in IIS I have the following settings for the bindings of the site.</p>
  
  <pre><code>Type    Host Name        Port  IP Address
  http    localdev.me      80    *
  http    *.localdev.me    80    *
  </code></pre>
  
  <p>I can ping localdev.me with any subdomain and I get the loopback address as expected. When I then setup the hotfix branch (exactly the same as the dev but with the following bindings) I get name not resolved errors.</p>
  
  <pre><code>Type    Host Name           Port  IP Address
  http    localhotfix.me      80    *
  http    *.localhotfix.me    80    *
  </code></pre>
  
  <p>Is there a reason the first setup would work and not the second? What is perhaps even stranger if I tell IIS to stop I can still ping subdomains on localdev.me and get the loopback address.</p>
  
  <p>I could always get it working by manually specifying the host name in my windows hosts file but I would rather not do that as I would need to go in and edit the file every time we add a new subdomain.</p>
  
  <p>EDIT: These are the specific errors I am getting. </p>
  
  <pre><code>ping localhotfix.me
  Ping request could not find host localhotfix.me. Please check the name and try again.
  </code></pre>
  
  <p>EDIT2: I have a solution that works fairly well. It requires Acrylic DNS and installation of the Microsoft Loopback Adapter. I set the loopback adapter to a valid IP Address and set the DNS server to 127.0.0.1 then edit the AcrylicHosts file to contain entries for each domain with a wildcard. Once I did all of this I was able to ping localhotfix.me along with *.localhotfix.me. I believe the reason localdev.me worked is because it is a valid domain. The name would resolve at which point I believe IIS was able to take over. But thats really just an educated guess. But kindof makes sense as to why it worked for one and not the other.</p>