title: traefik doesn't redirect http to https
body: <p>I'm new in traefik, and couldn't understand why it doesn't redirect.
  I saw a lot ways how to do redirect , and this one pretty match for me, because i want, that redirect works on the all routers.
  Especially I don't want to write redirect to labels of every router</p>
  <p>docker-compose.yml</p>
  <pre><code>services:
    traefik:
      image: traefik:v2.5
      container_name: traefik
      restart: unless-stopped
      security_opt:
        - no-new-privileges:true
      ports:
        - 80:80
        - 443:443 
        - 8082:8082
      volumes:
        - /etc/localtime:/etc/localtime:ro
        - /var/run/docker.sock:/var/run/docker.sock:ro
        - ./data/traefik.yml:/traefik.yml:ro
        - ./data/custom/:/custom/:ro
        - ./data/acme.json:/acme.json
      labels:
        - &quot;traefik.enable=true&quot;
        - &quot;traefik.http.routers.traefik.rule=Host(`traefik.example.com`)&quot;
        - &quot;traefik.http.routers.traefik.tls=true&quot;
        - &quot;traefik.http.routers.traefik.tls.certresolver=letsEncrypt&quot;
        - &quot;traefik.http.routers.traefik.service=api@internal&quot;
        - &quot;traefik.http.services.traefik-traefik.loadbalancer.server.port=888&quot;
        - &quot;traefik.http.middlewares.traefik-auth.basicauth.users=admin:$$apr1$$yTyey7a2$$CDmIjg/aratMfqENIHcQW1&quot;
        - &quot;traefik.http.routers.traefik.middlewares=traefik-auth&quot;
  </code></pre>
  <p>traefik.yml</p>
  <pre><code>api:
    dashboard: true
  
  entryPoints:
    http:
      address: &quot;:80&quot;
      http:
        redirections:
          entryPoint:
            to: https
            scheme: https
            permanent: true
    https:
      address: &quot;:443&quot;
    metrics:
      address: &quot;:8082&quot;
  
  metrics:
    prometheus:
      entryPoint: metrics
  
  providers:
    docker:
      endpoint: &quot;unix:///var/run/docker.sock&quot;
      exposedByDefault: false
    file:
      directory: /custom
      watch: true
  
  certificatesResolvers:
    letsEncrypt:
      acme:
        email: postmaster@example.com
        storage: acme.json
        #caServer: &quot;https://acme-staging-v02.api.letsencrypt.org/directory&quot;
        httpChallenge:
          entryPoint: http
  </code></pre>