Let's encrypt not redirecting to www(https).
Let's encrypt not redirecting to www(https).
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.
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Let's encrypt not redirecting to www(https).
Can you paste your redirect rule here?
Re: Let's encrypt not redirecting to www(https).
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"
Re: Let's encrypt not redirecting to www(https).
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.