# Priority and https (LE)

**URL:** <https://community.traefik.io/t/priority-and-https-le/30571>\
**Category:** Traefik v3 (latest)\
**Tags:** docker, letsencrypt-acme\
**Created:** [November 25, 2026, 10:29am UTC](https://community.traefik.io/t/priority-and-https-le/30571 "2026-11-25T10:29:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Staffan](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Staffan](https://community.traefik.io/u/Staffan)\
**Post date:** [November 25, 2026, 10:29am UTC](https://community.traefik.io/t/priority-and-https-le/30571/1 "2026-11-25T10:29:32Z")

</div>

Hello!

I host a bunch of sites on docker behind a traefik reverse proxy, using letsencrypt to provide https for them. This all works perfectly smoothly using a combination of command line arguments and docker labels, general setup goes on the traefik command line/labels and the host-specific config goes in the container compose file, generally something on the line of:

```yaml
    labels:
      - "traefik.http.routers.example.rule=Host(`www.example.com`) || Host(`example.com`)"
      - "traefik.http.routers.example.tls=true"
      - "traefik.http.routers.example.tls.certresolver=le"
      - "traefik.http.routers.example.entryPoints=https"
      - "traefik.http.routers.example.middlewares=redirect-to-www"

      - "traefik.http.routers.example80.rule=Host(`www.example.com`) || Host(`example.com`)"
      - "traefik.http.routers.example80.entryPoints=http"
      - "traefik.http.routers.example80.middlewares=redirect-to-www,redirect-to-https"

```

However, I have a large update upcoming that will affect all sites and I want to place a simple notice to any visitors that we're currently having some maintenance.

I was easily able to do this for http by giving a new container with a maintenance page labels that gives it priority over everything else:

```yaml
    labels:
      - "traefik.http.routers.maintenance.rule=HostRegexp(`.*`)"
      - "traefik.http.routers.maintenance.priority=2000"
      - "traefik.http.services.maintenance.loadbalancer.server.port=8001"

```

However, this only works for http, my attempts to use a second route like I usually do to the container to catch https-traffic have all failed, presumably because traefik can't extract a hostname to construct a LE request for the container and thus just ignores the https part (and in this case, I would much prefer it to re-use the existing certificate for the "masked" host).

Is there a way of accomplishing this, or should I try to think of something else?

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [November 25, 2026, 10:32am UTC](https://community.traefik.io/t/priority-and-https-le/30571/2 "2026-11-25T10:32:06Z")

</div>

Are you setting a default `entrypoint` in static config? Have you tried:

```auto
    labels:
      - "traefik.http.routers.maintenance.rule=HostRegexp(`.*`)"
      - "traefik.http.routers.maintenance.priority=2000"
      - "traefik.http.routers.maintenance.entryPoints=http,https"
      - "traefik.http.services.maintenance.loadbalancer.server.port=8001"

```

---

<div class="post-metadata">

**Author:** ![Staffan](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Staffan](https://community.traefik.io/u/Staffan)\
**Post date:** [November 25, 2026, 10:46am UTC](https://community.traefik.io/t/priority-and-https-le/30571/3 "2026-11-25T10:46:41Z")

</div>

Thanks for replying, but while I was waiting to have my post approved, I got it working (always happens, doesn't it). The magic incantation turned out to be:

```yaml
    labels:
      - "traefik.http.routers.maintenance.rule=HostRegexp(`.*`)"
      - "traefik.http.routers.maintenance.priority=2000"
      - "traefik.http.routers.maintenance.entryPoints=http"
      - "traefik.http.routers.maintenance.service=maintenance"
      - "traefik.http.services.maintenance.loadbalancer.server.port=8001"

      - "traefik.http.routers.maintenance-https.rule=HostRegexp(`.*`)"
      - "traefik.http.routers.maintenance-https.tls=true"
      - "traefik.http.routers.maintenance-https.priority=2000"
      - "traefik.http.routers.maintenance-https.entryPoints=https"
      - "traefik.http.routers.maintenance-https.service=maintenance-https"
      - "traefik.http.services.maintenance-https.loadbalancer.server.port=8001"

```

I think the important bit is `traefik.http.routers.*.service`. Now everything magically just works.

I recall trying multiple values to `entryPoints`, but that didn't do it. Having `...tls=true` set is probably crucial. I do not set a default entrypoint in the static config.

Cheers!
