Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to redirect all http traffic to https as the site requires SSL.

For example, if someone navigates to or I want to redirect the user to

Right now the user gets a 403.4 Forbidden error - The page you are trying to access is secured with Secure Sockets Layer (SSL).

I've tried a number of different URL rewrite rules but none of them seem to work. In fact nothing seems to be happening different at all, almost like the module isn't even working properly.

First, is my rule correct? And if so, what else could be preventing this from working properly?

            <rule name="Redirect all http traffic to https" enabled="true" stopProcessing="true">
                <match url="(.*)" ignoreCase="true" />
                    <add input="{HTTPS}" pattern="off" />
                <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
share|improve this question
Your condition is expecting the input to be {HTTPS}. Try removing that condition. – Tim Dec 20 '11 at 15:01
Just remove the condition or change it? – Tom Dec 20 '11 at 15:06
I would just remove, it is asking for a condition you do not need. – Tim Dec 20 '11 at 15:07
Thanks, unfortunately IIS is still not redirecting after removing that condition. – Tom Dec 20 '11 at 15:09
up vote 2 down vote accepted
<rule name="Redirect to HTTPS" stopProcessing="true">
  <match url="(.*)" />
    <add input="{HTTPS}" pattern="^OFF$" />
  <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />

And SSL needs to be off apparently.

Not sure if the and tags are appropriate.

share|improve this answer
Yeah, that was the hold up. I had require SSL checked. Once I unchecked it, the URL rewrites fired correctly, thanks. – Tom Dec 20 '11 at 15:57
Just to add to an old thread.... I had same issue, yet SSL was unchecked So I checked it.. apply Uncheck .... apply Works now like a charm – user233501 Jul 18 '14 at 20:14
This worked for me. Mathias R. Jessen references this as the first of two ways to approach this problem.… – JosephMCasey Mar 30 '15 at 14:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.