Simohammedhttc Simohammedhttc - 2 months ago 9
Apache Configuration Question

Error on apache https redirect (untrusted connection)

I installed an SSL certificate, for both my root and www domains.


I want to redirect my apex domain to

.

I tried with the mod_rewrite Apache module, then with the redirect command, which seems more performant:

<VirtualHost *:443>
ServerName afa-advisory.com
Redirect permanent / https://www.afa-advisory.com
</VirtualHost>


The root domain redirection works well in some browsers without problems (Chrome, Chrome Canari) and triggers an untrusted security certificate in other browsers (Firefox, IE10).

Answer

... works well in some browsers without problems (Chrome, Chrome Canari) and triggers an untrusted security certificate in other browsers (Firefox, IE10).

It does not even work with Chrome for me. The reason is that the certificate for afa-advisory.com is a self-signed certificate issued for C = MA, L = Default City, O = Default Company Ltd, that is the issuer is untrusted and the subject does not match the domain. Since a valid certificate is needed to SSL connect to the site in order to get the redirection the browser will issue a warning when connecting to https://afa-advisory.com even though you only want to redirect.