Auto Redirect to SSL in IIS 6

Page 1 of 1

6 Replies - 3976 Views - Last Post: 25 November 2009 - 02:19 PM

#1 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 423
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Auto Redirect to SSL in IIS 6

Posted 24 November 2009 - 06:00 PM

Does anyone know how to configure IIS 6 on Windows Server 2003 to automatically redirect to HTTPS when the client only enters HTTP for the URL?

I've got the portal up and running and I installed the certificate from VeriSign.

When I set-up the web site, I checked the 'Require Secure Channel (SSL)' when I installed the certificate.

I made the assumption that IIS would automatically force the redirect. This is not the case.

What happens is the user just gets a 403.4 error stating they have to use HTTPS.

So besides programmatically forcing the redirect, I don't want to have to do this, is there a configuration setting in IIS that will do it automatically?

Is This A Good Question/Topic? 0
  • +

Replies To: Auto Redirect to SSL in IIS 6

#2 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1663
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Auto Redirect to SSL in IIS 6

Posted 24 November 2009 - 06:11 PM

  • In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.
  • Click the Home Directory, Virtual Directory, or Directory tab.
  • Under The content for this source should come from, click A redirection to a URL.
  • In the Redirect to box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type /NewCatalog.
You could also try his suggestion or these steps

Hope one of those help :)
Was This Post Helpful? 0
  • +
  • -

#3 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 423
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Auto Redirect to SSL in IIS 6

Posted 24 November 2009 - 06:35 PM

Thanks, but I already came across those tips.

I cannot change the default 403.4 error page because we have multiple sites running and this will affect all of them. And the info from the MSDN only redirects to a different location, but doesn't change the protocol.

You'd think this would be built in functionality of IIS, but after spending all day looking for answers, I've got nothing, other than coding for it to redirect. :(

I'm thinking of just putting the site in a subdirectory and only having a default.aspx page in the root of the web site. When the default.aspx loads, it does nothing more than redirect to HTTPS.

Seems like that requires the least amount of change and should work. Thoughts?
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1663
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Auto Redirect to SSL in IIS 6

Posted 24 November 2009 - 10:45 PM

Another option is to create a separate site (which the users will go to if they type in your url) then have a single file for that site, if you want an HTML file just have this in the page

<meta http-equiv="Refresh" content="0;URL=https://www.example.com" /



Or an ASP.NET page with

Response.Redirect("https://www.example.com");



EDIT: Jaymay Here's something that may work for you as well.
Was This Post Helpful? 0
  • +
  • -

#5 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 423
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Auto Redirect to SSL in IIS 6

Posted 25 November 2009 - 10:04 AM

That last link you provided might just do the trick. I will try it when I get back to work next week.

Thanks, Richard.
Was This Post Helpful? 0
  • +
  • -

#6 PsychoCoder   User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1663
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Auto Redirect to SSL in IIS 6

Posted 25 November 2009 - 10:09 AM

No problem (I spent a lot of time last night trying to find a resolution as it's an intriguing issue).
Was This Post Helpful? 0
  • +
  • -

#7 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: Auto Redirect to SSL in IIS 6

Posted 25 November 2009 - 02:19 PM

If the only website that you are wishing to host is this single one, could you just forward port 80 requests to port 443 on the router?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1