1

I have a SSL related redirection problem with ISS as follows:

  • http://example.com redirects to https://example.com
    • This works perfectly.
  • http://www.example.com redirects to https://www.example.com
    • Does not work perfectly, browsers report an issue with the SSL certification.

Question(s):

How can I resolve the issue with either the redirect or SSL certification?

2

You should check the common name on the certificate you purchased from your CA. While some CA's will give you a bonus subject alternate name of www.example.com if you buy a certificate using common name of example.com (and vice versa), others do not and your cert could just be bound to the common name of example.com.

Your certificate error doesn't look to be related to your redirect but to the common name bound to the certificate. Any web browser should give you the ability to view additional details on that certificate warning in order to determine why the warning is getting thrown.

  • Thank you. Yes, I just checked and the common name is example.com. I did notice that I have two certificates, one for example.com and one for www.example.com. This all started when one expired and I had to renew it. I am sure I am the cause of my own problems here! – user21346 Jan 10 '13 at 16:49
  • Okay, I think I found the problem. It looks like www.example.com is using the example.com certificate, which I believe is throwing the certificate error when going to www.example.com. I realize this is all probably "first-grade" stuff to you guys, so I just want to say thank you for your help, comments and patients. – user21346 Jan 10 '13 at 16:58
0

You can strip the www from the URL using this method:

SOURCE:

<rule name="Remove www" stopProcessing="true">
  <match url="(.*)" ignoreCase="true" />
  <conditions logicalGrouping="MatchAll">
    <add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
  </conditions>
  <action type="Redirect" url="http://{C:1}/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
  • 2
    That doesn't resolve the certificate issue. – user2320464 Sep 17 '16 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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