title: HTTP to HTTPS not working for my asp.net website
body: <p>I tried almost all upvoted suggestions related to web.config changes for http to https redirection. <a href="https://stackoverflow.com/questions/47089/best-way-in-asp-net-to-force-https-for-an-entire-site">Best way in asp.net to force https for an entire site?</a></p>
  
  <p>But it's not working for me for my ASP.net site. I use GoDaddy shared hosting and have multiple sites in my account. I have ssl enabled only for one website and have to add it to filter so that other sites in the same account are not redirected to https. Here's my web.config:</p>
  
  <pre><code>&lt;rewrite&gt;
    &lt;rules&gt;
      &lt;rule name="HTTP to HTTPS redirect" stopProcessing="true" enabled="true"&gt;
        &lt;match url="singledomain.*" /&gt;
        &lt;conditions&gt;
          &lt;add input="{HTTPS}" pattern="off" ignoreCase="true" /&gt;
        &lt;/conditions&gt;
        &lt;action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" /&gt;
      &lt;/rule&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>I can access the site currently by both http and https. But it never redirects from http to https. Is the match condition correct, and if it is,  what else could be the problem?</p>