I'm getting a connection reset error in browsers when I redirect a URL from http to https. I'm trying to locate the issue and have looked in C:\Windows\System32\LogFiles\HTTPERR and see only Timer_ConnectionIdle errors in the log. From what I was able to find, those are not related.

There are no logs in the FailedReqLogFiles folder and I'm not seeing anything but access logs in the W3SVC1 folder.

I'm completely lost on where to go from here. Here is my redirect rule.

Match URL
Requested URL: Matches the Pattern
Using: Regular Expressions
Pattern: .* and Ignore case

Logical grouping: Match All
Input: {HTTPS}
Type: Matches the Pattern
Pattern: off

Server Variables

Action type: Redirect
Redirect URL: https://{SERVER_NAME}/{R:0}
Append query string: checked
Redirect type: Permanent (301)

1 Answer 1


This snippet from web.config works for me.

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

The main difference between this and your configuration seems to be HTTP_HOST vs SERVER_NAME. I am using replacement pattern R:1 whereas you're using R:0, but this can be explained by the way I've defined my match pattern as (.*) rather than .*.

You must log in to answer this question.

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