Traefik 2.0 http to https

Hello I have the following middelware

kind: Middleware
  name: https-only
{{ include "traefik-middleware.labels" . | indent 4 }}
    scheme: https

However when i access a website via http I get 404. I was expecting Traefik to redirect to https.

What can I do to redirect from http to https

Hi @ekjuanrejon, with partial information, we cannot really help you.

Can you share more so we can help you? How is Traefik deployed? What are its logs (debug) ?
What are the Ingress routes and other custom object you defined?

In your case, the 404 in HTTP is probably related to the fact that no Traefik Router (e.g. IngressRoute) is catching your request when you reach the URL in HTTP.
As the Traefik Middleware objects are applied after a router matched a request (the documentation explains this workflow here:, then the redirect cannot happen if there is no router to apply it.