Mobile app version of vmapp.org
Login or Join
Deb1703797

: In IIS 7.5, how do you redirect an HTTPS domain to the canonical domain? So I have a site configured with example.com:80 and www.example.com:80, as well as a certificate for port 443. When

@Deb1703797

Posted in: #CanonicalUrl #Iis #Iis7 #UrlRewriting

So I have a site configured with example.com:80 and example.com:80, as well as a certificate for port 443.

When a user goes to the example.com:80 or 443, which has the SSL certificate configured correctly (the certificate is specifically for example.com, not example.com), everything is fine.

Additionally, if a user browses to domain.com:80, my application is able to redirect to example.com:443.

However, if the user types in "https://example.com", they force the load of the site, and the domain doesn't match the certificate. I'm not sure why URL Rewrite doesn't redirect in this case, since I put in "https://example.com" and it shows the correct test result.

Is there some other trick or method to get the redirect to work, or is it "impossible" because you cannot redirect across domains with the HTTPS protocol?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Deb1703797

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berumen354

Hopefully if you're in a similar bind, this will help.

There are a few techniques for redirection. The URL Rewrite module from iis.net is a good recommendation.

My specific issue was that I had created a single domain SSL certificate for example.com, and if you browsed directly to example.com, the first thing that happens is detection of a mismatch between certificate and domain name, so redirection couldn't happen. So my fix was just to replace the certificate with a SAN certificate that included both example.com and example.com.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme