# Traefik redirecting its dashboard to http instead of specified https

**URL:** <https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [December 23, 2022, 9:04pm UTC](https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914 "2022-12-23T21:04:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![UntouchedWagons](https://avatars.discourse-cdn.com/v4/letter/u/aeb1de/32.png) [@UntouchedWagons](https://community.traefik.io/u/UntouchedWagons)\
**Post date:** [December 23, 2022, 9:04pm UTC](https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914/1 "2022-12-23T21:04:29Z")

</div>

I recently replaced my SWAG reverse proxy with Traefik and it's mostly working, I have only two issues to resolve but I'll focus on one for now.

I use [Homer](https://hub.docker.com/r/b4bz/homer) as a dashboard for all the stuff I run on my servers and in the list of links I have a link to Traefik's dashboard in the form of [https://dashboard.docker.REDACTED](https://dashboard.docker.REDACTED) but when I click on the link Traefik sends Firefox a redirect to [http://dashboard.docker.REDACTED](http://dashboard.docker.REDACTED) for some reason and I get an HTTP 404 error. If I open a new tab and enter [https://dashboard.docker.REDACTED](https://dashboard.docker.REDACTED) manually I get the Traefik dashboard as expected.

Here is my docker-compose.yaml file:

```auto
version: "3.3"

services:
  traefik:
    image: "traefik:v2.9"
    container_name: "traefik"
    command:
      - --log.level=DEBUG
      - --api.insecure=true
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
      - --entrypoints.web.http.redirections.entryPoint.to=https
      - --entrypoints.web.http.redirections.entryPoint.scheme=https
      - --entrypoints.web.http.redirections.entrypoint.permanent=true
      - --entrypoints.websecure.http.tls.domains[0].main=docker.REDACTED
      - --entrypoints.websecure.http.tls.domains[0].sans=*.docker.REDACTED
      - --entrypoints.websecure.http.tls.certresolver=myresolver
      - --certificatesresolvers.myresolver.acme.dnschallenge=true
      - --certificatesresolvers.myresolver.acme.dnschallenge.provider=cloudflare
      - --certificatesresolvers.myresolver.acme.email=REDACTED
      - --certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`dashboard.docker.REDACTED`)"
      - "traefik.http.routers.dashboard.service=dashboard"
      - "traefik.http.routers.dashboard.entrypoints=websecure"
      - "traefik.http.services.dashboard.loadbalancer.server.port=8080"
    ports:
      - 80:80
      - 443:443
    environment:
      - CF_DNS_API_TOKEN=REDACTED
    volumes:
      - data:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro

```

---

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [December 24, 2022, 3:36pm UTC](https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914/2 "2022-12-24T15:36:04Z")

</div>

```auto
      - --api.insecure=true

```

This is why

---

<div class="post-metadata">

**Author:** ![UntouchedWagons](https://avatars.discourse-cdn.com/v4/letter/u/aeb1de/32.png) [@UntouchedWagons](https://community.traefik.io/u/UntouchedWagons)\
**Post date:** [December 24, 2022, 3:49pm UTC](https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914/3 "2022-12-24T15:49:55Z")

</div>

Okay I removed that line and recreated the container. I still get redirected to http, and if I enter [https://dashboard.docker.REDACTED](https://dashboard.docker.REDACTED) I get the error Bad Gateway

---

<div class="post-metadata">

**Author:** ![UntouchedWagons](https://avatars.discourse-cdn.com/v4/letter/u/aeb1de/32.png) [@UntouchedWagons](https://community.traefik.io/u/UntouchedWagons)\
**Post date:** [December 24, 2022, 6:29pm UTC](https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914/4 "2022-12-24T18:29:39Z")

</div>

I spent about three hours trying to get Traefik to display its own dashboard properly and failed. I switched to Nginx Proxy Manager and got everything working in about 10 minutes.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [December 27, 2022, 6:30pm UTC](https://community.traefik.io/t/traefik-redirecting-its-dashboard-to-http-instead-of-specified-https/16914/5 "2022-12-27T18:30:38Z")

</div>

Closed on December 27, 2022, 6:30pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
