Support for security such as Firewalls and securing linux
4 posts • Page 1 of 1
Hello, I have installed ssl to my site but something is off, when I access my site on non-www(no https) it should be redirected to www(https) since I force it on the htaccess to work like that for non-www, but it's not working but before I install the ssl certificates the redirection from non-www(no https) to www(no https) is working fine. Just wondering is there a settings I should adjust on the ssl installation? Any help is appreciated, thanks.
Hello thanks for the reply, I figured out the problem it's on the ssl side, somehow you can also assign an ssl to non www which I did with this:
Then I restarted the server, which now make a redirection from non www to www.
Code: Select all
sudo certbot --authenticator standalone --installer apache -d yoursite.com -d www.yoursite.com --pre-hook "apachectl stop" --post-hook "apachectl start"
You're missing the point. Certbot does NOT send an HTTP redirect Apache (in your case) does. Tell Apache to redirect. Better yet, have a read of Apache's (extensive) documents and a little read of TLS and then maybe you'd get a clue.