# Problem in installing Let's Encrypt SSL for www and non-www

**URL:** <https://meta.discourse.org/t/problem-in-installing-lets-encrypt-ssl-for-www-and-non-www/88515>\
**Category:** Self-hosting\
**Created:** [May 26, 2018, 6:37pm UTC](https://meta.discourse.org/t/problem-in-installing-lets-encrypt-ssl-for-www-and-non-www/88515 "2018-05-26T18:37:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Gulshan\_Kumar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gulshan_kumar/32/119562_2.png) [@Gulshan\_Kumar](https://meta.discourse.org/u/Gulshan_Kumar)\
**Post date:** [July 7, 2018, 8:25am UTC](https://meta.discourse.org/t/problem-in-installing-lets-encrypt-ssl-for-www-and-non-www/88515/6 "2018-07-07T08:25:28Z")

</div>

@PoojaPatel  
Assuming, www is your canonical version for Discourse. But you installed Let’s Encrypt only for apex domain.

Here’s fix…

- Re-install Discourse
- Install SSL for your _www_ because that is your canonical
- Restore Discourse backup
- Setup Cloudflare
- Go to DNS
- Enable its DNS only for www CNAME or A record.
- However must enable its DNS as well proxy for apex domain
- Choose Flexible SSL
- Force HTTPS

EXPECTED: HTTPS version should work fine for redirecting users from non-www to www version. Once I fixed SSL error this problem using this method.

Short version without re-installing SSL at www as per your canonical URL, That I cannot recommend.  
(Setup Cloudflare proxy completely over www and non-www)

---

_[View the full topic](https://meta.discourse.org/t/problem-in-installing-lets-encrypt-ssl-for-www-and-non-www/88515)._
