I am trying to set up http to https rewrite in IIS 8.5 using the Rewrite module. Absolutely nothing I have tried has any affect whatsoever. The URL is of the form: http://users-dev.somedomain.com. The rule currently created in the web.config is:

    <rule name="Redirect to HTTPS" stopProcessing="true">
       <match url="(.*)" />
          <add input="{HTTPS}" pattern="^OFF$" />
       <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />

And I have tried many variations since. Earlier tinkering with URL rewrite I could see various rules taking effect, but it seems now that nothing I do has any affect at all...I suspect something is up with IIS. I have also tried an IIS restart, to no avail...

Any ideas?

  • Enable Failed Request Tracing and search for RewriteModule in the logs. Jul 31, 2015 at 16:05

3 Answers 3


It turned out that under the sites SSL settings the "Require SSL" checkbox was checked. If this is checked the client cannot get through on port 80 at all and the rewrite never happens...

If you are using the rewrite module you cannot have "Require SSL" checked as the initial request needs to be able to get through on port 80.


Well, I thought I ran into the same case as MrLane on IIS 8.5.

It took me day to find out that I had not have the website running on the port 80.

I just add this binding (port 80) and the rule work as expeceted.

Hope this can help to solve MrLane's case.


This works for me:

<rule name="Redirect to HTTPS" stopProcessing="true">
        <match url="(.*)" />
                <add input="{HTTPS}" pattern="off" />
        <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" />
  • Yep I have tried this as well, no change. I think something is wrong with the rewrite module |:
    – MrLane
    Jul 31, 2015 at 3:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .