Redirecting CWA 2007 R2 from HTTP to HTTPS in IIS 7

This task has always been more of a pain that it ever should have, regardless of application. After trying a few of the usual hacks like requiring SSL and using a custom error page or an HTTP to HTTPS module I found I still wasn’t having any luck. From what I can tell this is because there actually isn’t any kind of default web page in the CWA virtual directory so when you browse to the HTTP version of the site you actually get a 404 “Page not Found” error before anything else happens.

I ended up keying off that idea and changed the 404 error page to be a redirect to the HTTPS page. I’m still testing this out, but I haven’t run into any issues yet with this approach. To change your site the same way:

  1. Open IIS 7 Manager.
  2. Click on the CWA virtual web site you want to redirect.
  3. Double-click on Error Pages.
  4. Highlight 404 and press Edit in the right pane.
  5. Select the Respond with a 302 redirect, enter https://My-CWA-URL and click OK.
  6. Run a iisreset /noforce for good measure.

I’m curious how this works for everyone and if you see any issues with this method.

Here

Recent content I've written for you—just for you!— to enjoy while you're here.

There

Quick commentary and links to other sources you'll find interesting. I promise.

Everywhere

Some personal background, links to related projects, and other ways to connect.

Hi there. My name is Tom Pacyk and this is my small home on the web. I love the intersection of design, technology, and communication, which is a combination that led me to a career in sales and marketing roles at places like Zoom and ServiceNow. They're a bit old now, but I also had the opportunity to publish a couple of books along the way.

Portland, Oregon is home for me, my wife Beth, and our three kids, but I'm actually a Midwestern transplant—I grew up in the Chicago suburbs and went to school at Purdue and Illinois. When I find some free time I'm probably going to concerts, rooting for the Portland Timbers, or working on my Sunshine Burn Photography project.