# HTTPS redirect not working with annotation

**URL:** <https://discuss.konghq.com/t/https-redirect-not-working-with-annotation/6798>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [July 27, 2020, 8:27am UTC](https://discuss.konghq.com/t/https-redirect-not-working-with-annotation/6798 "2020-07-27T08:27:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![soprater](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@soprater](https://discuss.konghq.com/u/soprater)\
**Post date:** [July 27, 2020, 8:27am UTC](https://discuss.konghq.com/t/https-redirect-not-working-with-annotation/6798/1 "2020-07-27T08:27:01Z")

</div>

Greetings,

In the past I used a KongIngress to redirect HTTP to HTTPS and annotated my ingress resource with the respective KongIngress. Working perfectly

I just updated my cluster with the Kong all-in-one-dbless script to the newest version kong:2.0 and kong-ingress-controller:0.9.1.  
Now I use “[konghq.com/https-redirect-status-code](http://konghq.com/https-redirect-status-code)” directly on the ingress resource. Therefore assuming that the KongIngress for redirecting HTTP traffic is not necessary anymore.

Unfortunately the annotation has no impact at all. Do I need to configure a KongIngress and annotate it with “[konghq.com/override](http://konghq.com/override)” on the ingress resource? If yes, what does the annotation “[konghq.com/https-redirect-status-code](http://konghq.com/https-redirect-status-code)” do?

Thanks and best regards

appendix ingress resource:

```
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
    konghq.com/https-redirect-status-code: "301"
    konghq.com/strip-path: "true"
    kubernetes.io/ingress.class: kong
    kubernetes.io/tls-acme: "true"
  name: frontend
  namespace: dev
spec:
  rules:
  - host: dev.xx.net
    http:
      paths:
      - backend:
          serviceName: frontend
          servicePort: 80
        path: /
  tls:
  - hosts:
    - dev.xx.net
    secretName: frontend-tls

```

---

<div class="post-metadata">

**Author:** ![orangie](https://avatars.discourse-cdn.com/v4/letter/o/6a8cbe/32.png) [@orangie](https://discuss.konghq.com/u/orangie)\
**Post date:** [July 27, 2020, 4:39pm UTC](https://discuss.konghq.com/t/https-redirect-not-working-with-annotation/6798/2 "2020-07-27T16:39:37Z")

</div>

You also need to add:  
`konghq.com/protocols: https`  
because the default is `http,https` meaning it will not redirect traffic on http.

---

<div class="post-metadata">

**Author:** ![soprater](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@soprater](https://discuss.konghq.com/u/soprater)\
**Post date:** [July 28, 2020, 5:45am UTC](https://discuss.konghq.com/t/https-redirect-not-working-with-annotation/6798/3 "2020-07-28T05:45:07Z")

</div>

I missed that like a pro… Thanks - working perfectly now!
