# Setup Let’s Encrypt + non-www \> www

**URL:** <https://meta.discourse.org/t/setup-let-s-encrypt-non-www-www/84840>\
**Category:** Sysadmins\
**Tags:** how-to, domains\
**Created:** [April 8, 2018, 10:33pm UTC](https://meta.discourse.org/t/setup-let-s-encrypt-non-www-www/84840 "2018-04-08T22:33:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BlackKnob](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blackknob/32/93549_2.png) [@BlackKnob](https://meta.discourse.org/u/BlackKnob)\
**Post date:** [April 8, 2018, 11:47pm UTC](https://meta.discourse.org/t/setup-let-s-encrypt-non-www-www/84840/2 "2018-04-08T23:47:18Z")

</div>

I wonder if this part is needed, since we already have the “force https” option in Admin settings.  
@brahn, this is your part of the code, can you explain why is this necessary?

> ```
> - replace:
> filename: "/etc/nginx/conf.d/discourse.conf"
> from: /return 301 https.+/
> to: |
> return 301 https://$host$request_uri;
> 
> ```

---

_[View the full topic](https://meta.discourse.org/t/setup-let-s-encrypt-non-www-www/84840)._
