# Proper way to enforce https only?

**URL:** <https://forum.elixirforum.com/t/proper-way-to-enforce-https-only/2117>\
**Category:** Questions\
**Tags:** phoenix, https\
**Created:** [October 25, 2016, 8:11pm UTC](https://forum.elixirforum.com/t/proper-way-to-enforce-https-only/2117 "2016-10-25T20:11:08Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![ibgib](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ibgib/32/2176_2.png) [@ibgib](https://forum.elixirforum.com/u/ibgib)\
**Post date:** [March 27, 2017, 11:57am UTC](https://forum.elixirforum.com/t/proper-way-to-enforce-https-only/2117/7 "2017-03-27T11:57:26Z")

</div>

> [@chensan](#):
>
> I’m offloading the SSL termination to HAProxy, you can do the redirect easy in haproxy.cfg

Yes, FWIW this is what I ended up doing as well with [ibGib using nginx](https://github.com/ibgib/ibgib/blob/master/ib_gib_umb/nginx/default.conf). I ended up terminating the SSL at the proxy, redirect 301, etc.

---

_[View the full topic](https://forum.elixirforum.com/t/proper-way-to-enforce-https-only/2117)._
