# How to avoid redirecting from "https" to "http"

**URL:** <https://meta.discourse.org/t/how-to-avoid-redirecting-from-https-to-http/277397>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [August 31, 2023, 5:57pm UTC](https://meta.discourse.org/t/how-to-avoid-redirecting-from-https-to-http/277397 "2023-08-31T17:57:49Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

[lots_blue](/t/-/277397/1) reports an issue with their self-hosted Discourse instance on CentOS using Docker and a separate Nginx reverse proxy. While the site loads correctly via HTTPS, users are redirected to HTTP after logging in, and activation emails also contain insecure HTTP links, blocking further access. The user seeks the specific configuration needed to ensure all redirects and links default to HTTPS. [simon](/t/-/277397/2) suggests that enabling the `force https` site setting should resolve the problem.

<div class="post-metadata">

**Author:** ![lots\_blue](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lots_blue/32/323721_2.png) [@lots\_blue](https://meta.discourse.org/u/lots_blue)\
**Post date:** [August 31, 2023, 5:57pm UTC](https://meta.discourse.org/t/how-to-avoid-redirecting-from-https-to-http/277397/1 "2023-08-31T17:57:49Z")

</div>

Hi!  
⭐Environment:  
My discourse docker(Recent version) is deployed on a single server(centOS) and uses a ‘80:3000’ configuration, followed by separate use of nginx to provide HTTPS services.

⭐Problem:  
Users can access it normally “[https://example.com](https://example.com)” . But after logging in, the redirect address changed to “[http://example.com](http://example.com)” (starts with http). The link in the activation email for new users also starts with http.  
The above situation will prevent users from further accessing the website.

⭐What configuration should I modify to make the jump link, redirect address, and email activation link on the page start with https？

Looking forward to answering. Thank you in advance 🌺.

---

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [August 31, 2023, 6:32pm UTC](https://meta.discourse.org/t/how-to-avoid-redirecting-from-https-to-http/277397/2 "2023-08-31T18:32:00Z")

</div>

> [@lots\_blue](#):
>
> The link in the activation email for new users also starts with http.

Enabling the `force https` site setting should fix this.
