# Forward Host header

**URL:** <https://community.traefik.io/t/forward-host-header/1065>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [July 29, 2019, 7:33am UTC](https://community.traefik.io/t/forward-host-header/1065 "2019-07-29T07:33:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LostKobrakai](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/lostkobrakai/32/519_2.png) [@LostKobrakai](https://community.traefik.io/u/LostKobrakai)\
**Post date:** [July 29, 2019, 7:33am UTC](https://community.traefik.io/t/forward-host-header/1065/1 "2019-07-29T07:33:43Z")

</div>

I'm trying to replicate this part of a nginx config:

```auto
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;

```

The first two parts seem to be default in traefik, but I cannot seem to find a way to forward the host header.

---

<div class="post-metadata">

**Author:** ![daniel.tomcej](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/daniel.tomcej/32/262_2.png) [@daniel.tomcej](https://community.traefik.io/u/daniel.tomcej)\
**Post date:** [July 29, 2019, 3:21pm UTC](https://community.traefik.io/t/forward-host-header/1065/2 "2019-07-29T15:21:24Z")

</div>

Hello @LostKobrakai,

Traefik does not currently support modification of the `Host` header. It interferes with how the proxy works in dynamic configuration settings.

---

<div class="post-metadata">

**Author:** ![LostKobrakai](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/lostkobrakai/32/519_2.png) [@LostKobrakai](https://community.traefik.io/u/LostKobrakai)\
**Post date:** [July 31, 2019, 7:20am UTC](https://community.traefik.io/t/forward-host-header/1065/3 "2019-07-31T07:20:05Z")

</div>

Are there plans to support that at a later time or is that something, which is never going to happen? Often backends just need the Host header to be set for things like url generation in markup to work properly.

---

<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:** [July 31, 2019, 10:30am UTC](https://community.traefik.io/t/forward-host-header/1065/4 "2019-07-31T10:30:41Z")

</div>

The header `X-Forwarded-Host` can be used then: [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host)
