redirectScheme set on route but not forcing scheme

I'm still fairly new to Traefik and so I still feel like I'm constantly fighting it :slight_smile:

That said, this one definitely seems.. not right. I've got a redirectscheme middleware setup for a domain ( and it doesn't seem to be forcing the redirect.

The middleware shows up on the dashboard, and also shows up in the router on the dashboard.

However, the HTTP call goes something like this:

Forgive the config for being a bit of a mess since its in rancher:

Are there any ideas as to why this wouldn't be redirecting?

I'm assuming you're using Traefik 2.x and hopefully at 2.2 since they simplified things for this one.

The CLI configuration you can use is


A full example of how I set it up is in Trajano base Docker swarm stacks (I just updated it today to use the new 2.2 constructs reducing a few lines of code in TOML.

Hello, I started using v2.2 in Docker and the global HTTPS redirection doesn't work for me.
I'm doing it in the static conf under /etc/traefik/traefik.toml.
It looks like this:

  address = ":80"
    to = "websecure"
    scheme = "https"

  address = ":443"

I also see it in the log:

time="2020-04-21T13:34:59Z" level=debug msg="Added outgoing tracing middleware noop@internal" routerName=web-to-websecure@internal entryPointName=web middlewareName=tracing middlewareType=TracingForwarder
time="2020-04-21T13:34:59Z" level=debug msg="Creating middleware" middlewareType=RedirectScheme entryPointName=web routerName=web-to-websecure@internal middlewareName=redirect-web-to-websecure@internal
time="2020-04-21T13:34:59Z" level=debug msg="Setting up redirection to https 443" entryPointName=web routerName=web-to-websecure@internal middlewareName=redirect-web-to-websecure@internal middlewareType=RedirectScheme
time="2020-04-21T13:34:59Z" level=debug msg="Adding tracing to middleware" entryPointName=web routerName=web-to-websecure@internal middlewareName=redirect-web-to-websecure@internal

But it doesn't work for my Docker Container at all, it always resolves to http.
All my containers are setup like this:

  - traefik.enable=true
  - traefik.enable=true

Thank you for your replay. I tried it too, it doesn't work either.
The only think that works, if I define a redirectScheme middleware and assign it to for each container. But that's what I wanted to prevent with thew new feature. :frowning:

I have no idea if it's the reason, but I know added tls to each container and it works now.
Like this:

  - "traefik.enable=true"
  - ""
  - "``)"
  - ",websecure"
  - ""