# Traefik 2.0 http to https

**URL:** <https://community.traefik.io/t/traefik-2-0-http-to-https/3189>\
**Category:** Traefik v2\
**Tags:** kubernetes-crd\
**Created:** [November 27, 2019, 12:14pm UTC](https://community.traefik.io/t/traefik-2-0-http-to-https/3189 "2019-11-27T12:14:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ekjuanrejon](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@ekjuanrejon](https://community.traefik.io/u/ekjuanrejon)\
**Post date:** [November 27, 2019, 12:14pm UTC](https://community.traefik.io/t/traefik-2-0-http-to-https/3189/1 "2019-11-27T12:14:18Z")

</div>

Hello I have the following middelware

```auto
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: https-only
  labels:
{{ include "traefik-middleware.labels" . | indent 4 }}
spec:
  redirectScheme:
    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

---

<div class="post-metadata">

**Author:** ![dduportal](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/dduportal/32/4_2.png) [@dduportal](https://community.traefik.io/u/dduportal)\
**Post date:** [November 28, 2019, 11:11am UTC](https://community.traefik.io/t/traefik-2-0-http-to-https/3189/2 "2019-11-28T11:11:16Z")

</div>

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: [https://docs.traefik.io/v2.0/routing/overview/](https://docs.traefik.io/v2.0/routing/overview/)), then the redirect cannot happen if there is no router to apply it.
