title: Why does SSL 443 fail to work in IIS Express for custom domains of Visual Studio web projects?
body: <p>I have VS2013 set up with IIS Express to use a custom domain as follows:</p>
  
  <pre><code>http://mydomain.local
  https://mydomain.local
  </code></pre>
  
  <p>The port 80 url works great, the port 443 does not (<strong>Bad Request</strong>, Page Cannot Be Displayed, aka site doesn't exist). </p>
  
  <p><strong>Why?</strong></p>
  
  <p>Clearly IIS Express is struggling to map or use port 443 with this name, but why?</p>
  
  <p><strong>applicationhost.config:</strong></p>
  
  <pre><code>  &lt;site name="MyDomain" id="16"&gt;
        &lt;application path="/" applicationPool="Clr4IntegratedAppPool"&gt;
            &lt;virtualDirectory path="/" physicalPath="C:\Projects\MyDomain" /&gt;
        &lt;/application&gt;
        &lt;bindings&gt;
            &lt;binding protocol="http" bindingInformation="*:80:MyDomain.local" /&gt;
            &lt;binding protocol="https" bindingInformation="*:443:MyDomain.local" /&gt;
        &lt;/bindings&gt;
    &lt;/site&gt;
  </code></pre>
  
  <p><strong>hosts file:</strong></p>
  
  <pre><code>127.0.0.1   MyDomain.local
  </code></pre>
  
  <p><strong>VS Project Properties:</strong></p>
  
  <p>Start Url, Project Url, and Override application root URL are all <code>https://MyDomain.local</code>.  </p>
  
  <p>Clicking <code>Create Virtual Directory</code> results in NO errors because it is happy with the config in applicationhosts.config.</p>
  
  <p>NOTE: with the above settings alone, <code>http://mydomain.local</code> (port 80) works fine!</p>
  
  <p>Further, looking at the properties window on the project node, all settings are as expected:</p>
  
  <pre><code>SSL Enabled: True
  SSL URL:     https://mydomain.local 
  URL:         http://mydomain.local
  </code></pre>
  
  <p>Also, looking at IIS Express in the task bar, these show up as expected for 443 and 80 respectively.</p>
  
  <p><strong>Going Ninja:</strong></p>
  
  <p>It should not be necessary (seems how http:// works without doing this), but I ran netsh for this just to be sure the URL is registered:</p>
  
  <pre><code>netsh http add urlacl url=https://MyDomain.local:443/ user=Everyone
  </code></pre>
  
  <p>This of course results in an error "... already exists". So then I run:</p>
  
  <pre><code>netstat -o
    TCP    127.0.0.1:80           mydomain:2063      ESTABLISHED     4
    TCP    127.0.0.1:2063         mydomain:http      ESTABLISHED     2276
    ...
  </code></pre>
  
  <p>I see nothing camping on port 443. No, Skype is not installed on this machine! (a supposedly common issue).</p>
  
  <p>I am at a total loss.  What the heck?  This is not rocket science.</p>
  
  <p><strong>Environment:</strong></p>
  
  <ul>
  <li>Windows 10 </li>
  <li>VS 2013 Update 5 (running as admin)</li>
  </ul>
  
  <p><strong>Other Info:</strong></p>
  
  <p>I have researched this like crazy.  Many articles on Stack Overflow and elsewhere. Here are just a couple of prime ones:</p>
  
  <p><a href="https://stackoverflow.com/questions/4709014/using-custom-domains-with-iis-express">Using Custom Domains With IIS Express</a></p>
  
  <p>and
  <a href="http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx" rel="nofollow noreferrer">http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx</a></p>
  
  <p>I have tried everything I can see that is logical to do. For the issue I am raising, the resolution is to set all the settings I just described. Since that doesn't work, it warrants a post of its own! </p>
  
  <p>What am I missing?</p>