# Http to https redirection through middlewares does not work unless globally enforced

**URL:** <https://community.traefik.io/t/http-to-https-redirection-through-middlewares-does-not-work-unless-globally-enforced/6755>\
**Category:** Traefik v2\
**Tags:** docker, kubernetes-ingress, middleware\
**Created:** [July 3, 2020, 2:22pm UTC](https://community.traefik.io/t/http-to-https-redirection-through-middlewares-does-not-work-unless-globally-enforced/6755 "2020-07-03T14:22:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![steve-todorov](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/steve-todorov/32/3920_2.png) [@steve-todorov](https://community.traefik.io/u/steve-todorov)\
**Post date:** [July 3, 2020, 3:23pm UTC](https://community.traefik.io/t/http-to-https-redirection-through-middlewares-does-not-work-unless-globally-enforced/6755/3 "2020-07-03T15:23:55Z")

</div>

Thanks for your reply!

It looks like I have missed this part of the documentation:

> If you need to define the same route for both HTTP and HTTPS requests, you will need to define TWO DIFFERENT routers: one with the tls section, one without.  
> [Routers | Traefik | v2.2](https://docs.traefik.io/v2.2/routing/routers/#tls)

---

_[View the full topic](https://community.traefik.io/t/http-to-https-redirection-through-middlewares-does-not-work-unless-globally-enforced/6755)._
