# Discourse always generates links to itself with http: rather than https:

**URL:** https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910
**Category:** Support
**Created:** [December 10, 2018, 3:10pm UTC](https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910 "2018-12-10T15:10:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Tom\_Boutell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_boutell/32/126443_2.png) [@Tom\_Boutell](https://meta.discourse.org/u/Tom_Boutell)
#### Post date: [December 10, 2018, 3:10pm UTC](https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910/1 "2018-12-10T15:10:15Z")

</div>

I have recently switched to having Discourse listen on a Unix socket and proxying through an nginx server on the underlying Linux system. Works great.

However, Discourse builds all of its internal links with `http`, so it’s mixed content warnings all over the place.

Is there a simple way to force this issue in `app.yml`? `DISCOURSE_PROTOCOL` would be great but I don’t think it exists.

I did try configuring nginx to pass a protocol header, but this doesn’t appear to make any difference:

`proxy_set_header X-Forwarded-Proto "https";`

Any thoughts? Thanks.

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [December 10, 2018, 3:27pm UTC](https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910/2 "2018-12-10T15:27:47Z")

</div>

Make sure you’ve enabled the `force_https` site setting in Discourse.

---

<div class="post-metadata">

### Author: ![Tom\_Boutell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_boutell/32/126443_2.png) [@Tom\_Boutell](https://meta.discourse.org/u/Tom_Boutell)
#### Post date: [December 10, 2018, 4:15pm UTC](https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910/3 "2018-12-10T16:15:33Z")

</div>

Thanks, now I’m down to tracking down a few things I apparently overrode in the header… somehow… when this was set up… years ago. 😢 😆

---

<div class="post-metadata">

### Author: ![Tom\_Boutell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tom_boutell/32/126443_2.png) [@Tom\_Boutell](https://meta.discourse.org/u/Tom_Boutell)
#### Post date: [December 10, 2018, 4:20pm UTC](https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910/4 "2018-12-10T16:20:57Z")

</div>

Figured that out too. Admin → Customize → Clicked on my existing “New Style” (this was what was not obvious) → drilled down from there to desktop header.

---

<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: [January 9, 2019, 4:21pm UTC](https://meta.discourse.org/t/discourse-always-generates-links-to-itself-with-http-rather-than-https/103910/5 "2019-01-09T16:21:53Z")

</div>

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