# How to redirect every request not just http?

**URL:** <https://community.traefik.io/t/how-to-redirect-every-request-not-just-http/13920>\
**Category:** Traefik v2\
**Tags:** kubernetes-ingress, kubernetes-crd\
**Created:** [March 26, 2022, 6:59pm UTC](https://community.traefik.io/t/how-to-redirect-every-request-not-just-http/13920 "2022-03-26T18:59:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yeranosyanvahan](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/yeranosyanvahan/32/5133_2.png) [@yeranosyanvahan](https://community.traefik.io/u/yeranosyanvahan)\
**Post date:** [March 26, 2022, 6:59pm UTC](https://community.traefik.io/t/how-to-redirect-every-request-not-just-http/13920/1 "2022-03-26T18:59:19Z")

</div>

I want to redirect ALL the requests including GRPC, web sockets, http and all that stuff to the service.  
For example argocd doesn't work well with traefik.

```auto
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  namespace: argocd
  name: argocd-server
spec:
  rules:
  - host: argocd.domain.com
    http:
      paths:
      - backend:
          service:
            name: argocd-server
            port:
              number: 443
        path: /
        pathType: Prefix

```

According to documentation, I need to redirect gRPC as well, but it doesn't seem to do so.

In some other cases it retuns 502 "Bad Gateway". How do I debug this? the service works fine, because I have tested it but traefik refuses to redirect for some reason.

---

<div class="post-metadata">

**Author:** ![NReilingh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/nreilingh/32/5116_2.png) [@NReilingh](https://community.traefik.io/u/NReilingh)\
**Post date:** [March 31, 2022, 4:45pm UTC](https://community.traefik.io/t/how-to-redirect-every-request-not-just-http/13920/2 "2022-03-31T16:45:28Z")

</div>

"Redirect" is an HTTP concept. A redirect works by sending an HTTP response to an HTTP client containing an HTTP header with the new URI. If Traefik sends an HTTP redirect response to a client, the client will no longer be communicating with Traefik.

I don't know much about the gRPC or WebSocket protocols, but I have no reason to assume that they support a similar concept, and if they did it would likely be implemented in a completely different way. Traefik is a proxy first and foremost, so you _can_ proxy HTTP and other TCP connections through it to a backend server, which appears to be what you are doing from your k8s config. You are **not** doing a redirect! You are doing an HTTP proxy.

To _proxy_ your gRPC and WebSocket connections (which use TCP as their transport), read up on [Configuring TCP Routers](https://doc.traefik.io/traefik/routing/routers/#configuring-tcp-routers) and [Configuring TCP Services](https://doc.traefik.io/traefik/routing/services/#configuring-tcp-services) in the docs.

---

<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:** [January 11, 2023, 1:21am UTC](https://community.traefik.io/t/how-to-redirect-every-request-not-just-http/13920/3 "2023-01-11T01:21:05Z")

</div>

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