Question

How can I switch my Ghost 1 Click blog from non-www to www?

Posted December 9, 2020 287 views
NginxGhost

I saw many answers on the internet. Mainly - changing the default file in sites-enabled. ( https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-nginx-on-ubuntu-14-04 this didn’t work for me) Can someone tell me what steps should I follow. I added SSL from letsencrypt when installing ghost and added A records for both non-www and www versions to work. I just want to auto-redirect. I’m a newbie to Ghost.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

I solved this. I changed www.domain.com.conf and www.domain.com-ssl.conf . Now it properly redirects to https://www.mydomain.com . But I get SSLERRORBADCERTDOMAIN error. My SSL doesn’t work. I know it’s supped to work for both www and non www versions. I have already added A records. When I remove above lines from conf files, both non-www and www work fine with https. What should I do to keep SSL for my www version