My setup is as follows:
- 100+ websites
- Each website has two host headers
any.com
andwww.any.com
- Requests for
www.any.com
are redirected toany.com
without changing protocol - Some of these websites need SSL
- Requests for
http://sslonly.com
are redirected tohttps://sslonly.com
- I have a multiple domain (a.k.a. UCC/SAN) SSL certificate that allows up to 50 subject alternative names
My questions:
What is the best way to set up subject alternative names on the SSL certificate? Do I need to add both
sslonly.com
andwww.sslonly.com
or justsslonly.com
?What is the best way to set up the redirects?
I am using IIS 8.5
Yes, you should add all names that are used for redirects. That is, if you connect to
https://example.com
and this site redirects tohttps://www.example.com
and it is the same web site, then your certificate must include both,example.com
andwww.example.com
in the Subject Alternative Names extension. If any redirect host part is not listed in the certificate, redirect will fail and stop at this point with certificate error in browser.