# Gateway http and grpc route with same hostname

**URL:** <https://community.traefik.io/t/gateway-http-and-grpc-route-with-same-hostname/26754>\
**Category:** Traefik v3 (latest)\
**Tags:** kubernetes-ingress\
**Created:** [March 5, 2025, 2:28pm UTC](https://community.traefik.io/t/gateway-http-and-grpc-route-with-same-hostname/26754 "2025-03-05T14:28:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JWood48](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jwood48/32/10080_2.png) [@JWood48](https://community.traefik.io/u/JWood48)\
**Post date:** [March 5, 2025, 2:28pm UTC](https://community.traefik.io/t/gateway-http-and-grpc-route-with-same-hostname/26754/1 "2025-03-05T14:28:15Z")

</div>

I am trying to switch to Kubernetes Gateway api from IngressRoute. I have 2 IngressRoutes pointing to the same hostname, one for http traffic and one for grpc (h2c) traffic - this worked by setting the match, priority and scheme:  
HTTP: `match: Host(`instance.localhost`)` + priority 10  
GRPC: `match: Host(`instance.localhost`) && Header(`Content-Type`, `application/grpc`)` + priority 11

Switching to Gateway api I use a HTTPRoute and a GRPCRoute both set to the same hostname, but his results in a

```auto
Content-Type is missing from the request

```

When trying to access the hostname from a browser?

In the dashboard the gateway api routes are identical:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/e/ec491524844bff5e5ad1e368a9268785748465f8.png)

Is it possible to have both http and grpc route on same hostname using gateway api?

---

<div class="post-metadata">

**Author:** ![JWood48](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jwood48/32/10080_2.png) [@JWood48](https://community.traefik.io/u/JWood48)\
**Post date:** [March 5, 2025, 2:30pm UTC](https://community.traefik.io/t/gateway-http-and-grpc-route-with-same-hostname/26754/2 "2025-03-05T14:30:22Z")

</div>

Here are the definitions:

HTTPRoute:

```auto
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: my-web-route
spec:
  parentRefs:
  - name: traefik-gateway
    namespace: default
  hostnames:
  - i2.localhost
  rules:
  - backendRefs:
    - name: my-svc
      port: 9090

```

GRPCRoute:

```auto
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
  name: my-grpc-route
spec:
  parentRefs:
  - name: traefik-gateway
    namespace: default
  hostnames:
  - "i2.localhost"
  rules:
  - backendRefs:
    - name: my-svc
      port: 6565

```

---

<div class="post-metadata">

**Author:** ![SayakMukhopadhyay](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/sayakmukhopadhyay/32/2671_2.png) [@SayakMukhopadhyay](https://community.traefik.io/u/SayakMukhopadhyay)\
**Post date:** [April 23, 2025, 5:25pm UTC](https://community.traefik.io/t/gateway-http-and-grpc-route-with-same-hostname/26754/3 "2025-04-23T17:25:47Z")

</div>

I have the exact same question. I am trying to setup ArgoCD and want to access both the web UI(http) and the CLI(grpc) using the same hostname but I don't see how I could do that.
