# How can I preserve the original HTTP Host Header to the Backendservers?

**URL:** <https://community.f5.com/t/how-can-i-preserve-the-original-http-host-header-to-the-backendservers/17720>\
**Category:** Technical Forums\
**Tags:** big-ip, irules, header-insert, headers, ltm, application-delivery, http\
**Created:** [January 19, 2018, 9:28am UTC](https://community.f5.com/t/how-can-i-preserve-the-original-http-host-header-to-the-backendservers/17720 "2018-01-19T09:28:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![b31\_133250](https://avatars.discourse-cdn.com/v4/letter/b/e0b2c6/32.png) [@b31\_133250](https://community.f5.com/u/b31_133250)\
**Post date:** [January 19, 2018, 9:28am UTC](https://community.f5.com/t/how-can-i-preserve-the-original-http-host-header-to-the-backendservers/17720/1 "2018-01-19T09:28:49Z")

</div>

Hi guys,

I’m trying the following configuration to loadbalance a RH SSO Key cloack Cluster:

**clientIP → https/443 → (clientssl-Profile) F5-Virtual Server (serverssl-Profile) → SNAT-IP → tcp8443 → Backendserver**

The Backendserver need to see the original client http Header, so I created a http Profile with the “Insert X-Forwarded-For”-Option enabled.

Alternative I tried the following iRule:

when HTTP\_REQUEST { HTTP::header insert X-Forwarded-For [IP::client\_addr] }

Unfortunaly, both ways didn’t work properly… How can I preserve the whole original HTTP Host Header trough the F5 to the Backendservers?

Thank you!

---

<div class="post-metadata">

**Author:** ![stan\_piron](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@stan\_piron](https://community.f5.com/u/stan_piron)\
**Post date:** [January 19, 2018, 9:43am UTC](https://community.f5.com/t/how-can-i-preserve-the-original-http-host-header-to-the-backendservers/17720/2 "2018-01-19T09:43:20Z")

</div>

This is the default behavior. X-Forwarded-For option insert client IP address in headers, but doesn’t change the Host header.

---

<div class="post-metadata">

**Author:** ![Only1masterbla1](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@Only1masterbla1](https://community.f5.com/u/Only1masterbla1)\
**Post date:** [January 19, 2018, 3:03pm UTC](https://community.f5.com/t/how-can-i-preserve-the-original-http-host-header-to-the-backendservers/17720/3 "2018-01-19T15:03:21Z")

</div>

F5 does not change HTTP headers by default. You can add headers (e.g. X-FORWARDED-FOR) thru http profile config. You can add/delete/modify host headers thru iRule.

---

<div class="post-metadata">

**Author:** ![Surgeon](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@Surgeon](https://community.f5.com/u/Surgeon)\
**Post date:** [January 20, 2018, 9:01am UTC](https://community.f5.com/t/how-can-i-preserve-the-original-http-host-header-to-the-backendservers/17720/4 "2018-01-20T09:01:34Z")

</div>

by default big-ip does not modify http headers. what does make you think that headers are being modified?
