: 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
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?
More posts by @Lee4591628
2 Comments
Sorted by latest first Latest Oldest Best
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>
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.