Routing External service // Adding Host Server


I am trying to proxy an external service via Traefik. I somehow can't get it to correctly set the host header so that the target service matches it to the right hostname.

Below an example with Google that demonstrates it (returns 404 because the host header isn't set to When turning on debugging the Host stays localhost/null.

What am I missing?

      rule = "PathPrefix(`/`)"
      middleware = ["hostHeader"]
      service = "google"

      Host = ""

        url = ""


Your configuration is more or less correct and it's working - I tested it and used your file as is.
More or less, because you do not need to mess around with the header and the middelware, you can safely comment that out.

I'm not sure if that's the reason. There is probably something else that you configured or are using incorrectly.

I have exactly the same problem:

Do you have already a solution?

Thanks in advance

I have the same issue, did you figure it out?