Mobile app version of vmapp.org
Login or Join
Lee4591628

: IIS NON-WWW to WWW Rewrite Issue with SSL certificate 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

@Lee4591628

Posted in: #Https #Iis #NoWww #SecurityCertificate #UrlRewriting

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

example.com redirects to example.com

This works perfectly.
www.example.com redirects to 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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee4591628

2 Comments

Sorted by latest first Latest Oldest Best

 

@Mendez628

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>

10% popularity Vote Up Vote Down


 

@Fox8124981

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 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme