# Links in emails are using http instead of https

**URL:** https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894
**Category:** Self-hosting
**Created:** [October 1, 2020, 8:26am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894 "2020-10-01T08:26:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Muhammad](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Muhammad](https://meta.discourse.org/u/Muhammad)
#### Post date: [October 1, 2020, 8:26am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/1 "2020-10-01T08:26:12Z")

</div>

I have successfully completed all the steps to setup a discussion forum for my company.  
I have TLS enabled and force\_https is checked in settings.  
The activation emails to new users are sent with http instead of https. e.g  
Welcome to Folio3 NS Community!

Click the following link to confirm and activate your new account:  
_http_://ns-community.folio3.com/u/activate-account/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  
I check the email tempate in settings from UI , and there is a variable base\_url which is containing http and my domain name.  
Any ideas on how to update the base\_url, so that it contains http instead of https.  
(My site is accessible by https not http)  
M. Saqib

---

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [October 1, 2020, 9:20am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/2 "2020-10-01T09:20:51Z")

</div>

If i go to your site `ns-community.folio3.com` I do not get the https version of it

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/b/0bdbe4d67b6e3fc3fb4022e4ea477b0cae4b2165.png)

This will mean, that emails that are sent with give the http:// version as it also dont get the https:// version

the email is setup like this:

> Welcome to %{site\_name}!
> 
> Click the following link to confirm and activate your new account:  
> %{base\_url}/u/activate-account/%{email\_token}
> 
> If the above link is not clickable, try copying and pasting it into the address bar of your web browser.

I would suggest you look at your https:// setup. Once you fix that, your email links will be fixed.

---

<div class="post-metadata">

### Author: ![Muhammad](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Muhammad](https://meta.discourse.org/u/Muhammad)
#### Post date: [October 1, 2020, 9:44am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/3 "2020-10-01T09:44:27Z")

</div>

My site is hosted at  
[https://ns-community.folio3.com/](https://ns-community.folio3.com/)

and not [http://ns-community.folio3.com/](http://ns-community.folio3.com/)

---

<div class="post-metadata">

### Author: ![Muhammad](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Muhammad](https://meta.discourse.org/u/Muhammad)
#### Post date: [October 1, 2020, 9:48am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/4 "2020-10-01T09:48:53Z")

</div>

Another application(gitlab) is hosted at port 80 i.e http.  
Do you mean, I have to add a rediection to https on my port 80 , to make the base\_url string get the correct https in the beginning?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [October 1, 2020, 10:36am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/5 "2020-10-01T10:36:28Z")

</div>

Sounds like you need to go through this guide:

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247/):
>
> @pfaffman edited this heavily 2022.02.24. Blame me if it’s broken. If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working. You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…

---

<div class="post-metadata">

### Author: ![Muhammad](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Muhammad](https://meta.discourse.org/u/Muhammad)
#### Post date: [October 8, 2020, 10:27am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/6 "2020-10-08T10:27:08Z")

</div>

It was my bad. I somehow missed the settings “force\_https” and it was showing checked to me. (may be browser caching)  
Another developer from my team checked that option and the emails are now received having links correctly as https.

Thank you all for your valuable comments!

---

<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: [November 7, 2020, 10:32am UTC](https://meta.discourse.org/t/links-in-emails-are-using-http-instead-of-https/165894/7 "2020-11-07T10:32:53Z")

</div>

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