# Force Redirect HTTP to HTTPS

**URL:** <https://meta.discourse.org/t/force-redirect-http-to-https/57393>\
**Category:** Product Support\
**Created:** [February 14, 2017, 10:17pm UTC](https://meta.discourse.org/t/force-redirect-http-to-https/57393 "2017-02-14T22:17:44Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![michaeltcoelho](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeltcoelho/32/120344_2.png) [@michaeltcoelho](https://meta.discourse.org/u/michaeltcoelho)\
**Post date:** [January 24, 2018, 3:24am UTC](https://meta.discourse.org/t/force-redirect-http-to-https/57393/6 "2018-01-24T03:24:30Z")

</div>

Hey @Falco, let me get into this conversation…

I’ve the same proble as @arothberg described. I am using a AWS Load Balancer with an Amazon Issued Certificate. When i was accessing my forum by [https://www.forum.com.br](https://www.forum.com.br) it worked fine, but when accessing by forum.com.br , as the default is http, not working.

I tried adding:

```plaintext
  - replace:
     filename: "/etc/nginx/conf.d/discourse.conf"
     from: /server.+{/
     to: |
       server {
         listen 80;
         return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
       }
       server {

```

But i received a Too Many Request error. I tried also:

```plaintext
  - replace:
     filename: "/etc/nginx/conf.d/discourse.conf"
     from: /server.+{/
     to: |
       server {
         listen 80;
         server_name forum.com.br www.forum.com.br;
         rewrite ^/(.*) https://$$ENV_DISCOURSE_HOSTNAME$request_uri permanent;
       }
       server {

```

But with no success…

Do you guys can help me? My forum is down..

Thanks in advance.

---

_[View the full topic](https://meta.discourse.org/t/force-redirect-http-to-https/57393)._
