# How to change email base\_url to use "https://"?

**URL:** https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336
**Category:** Support
**Created:** [September 8, 2020, 9:55am UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336 "2020-09-08T09:55:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![akvadrako](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akvadrako/32/192032_2.png) [@akvadrako](https://meta.discourse.org/u/akvadrako)
#### Post date: [September 8, 2020, 9:55am UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336/1 "2020-09-08T09:55:14Z")

</div>

The links discourse is sending in emails use the `http://` scheme, not `https`. Is there a way I can modify the **base\_url** for email templates?

I like to setup my webserver so all plaintext `http` requests are redirected to my `https` homepage. This ensures links shared externally with an incorrect scheme will not work, so an accidental future misconfiguration will not expose any users to MitM attacks. So the email links will be broken, as a redirect will not work.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [September 8, 2020, 12:02pm UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336/2 "2020-09-08T12:02:15Z")

</div>

I Guess you need to enable the `force_https` settings in discourse

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [October 1, 2020, 6:06pm UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336/3 "2020-10-01T18:06:10Z")

</div>

My Discourse is also sending emails with `http://email.forum.mydomain.com/` links instead of `https://email.forum.mydomain.com/`

I’m pretty sure I had `force_https` set to true before, and I went to check, but that setting is now missing from the admin. Where did it go?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [October 1, 2020, 6:13pm UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336/4 "2020-10-01T18:13:18Z")

</div>

It is hidden and enabled by default on new installs. You can drop into the rails console and check for it there:

```plaintext
./launcher enter app
rails c
SiteSetting.force_https
SiteSetting.force_https = true
exit
exit
exit

```

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [October 1, 2020, 6:17pm UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336/6 "2020-10-01T18:17:18Z")

</div>

Indeed it is set to true. So the question is why are the email links not `https`?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 31, 2020, 6:25pm UTC](https://meta.discourse.org/t/how-to-change-email-base-url-to-use-https/163336/7 "2020-10-31T18:25:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
