By prdinelka
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
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 SSL_ERROR_BAD_CERT_DOMAIN 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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
