# Tutorial: Setting up a Reverse Proxy With HubSpot CMS (with sample nginx & Cloudfront configs !)

**URL:** <https://community.hubspot.com/t/tutorial-setting-up-a-reverse-proxy-with-hubspot-cms-with-sample-nginx-cloudfront-configs/37034>\
**Category:** CMS Development\
**Created:** [May 10, 2021, 5:56pm UTC](https://community.hubspot.com/t/tutorial-setting-up-a-reverse-proxy-with-hubspot-cms-with-sample-nginx-cloudfront-configs/37034 "2021-05-10T17:56:01Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![docdaneeka](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@docdaneeka](https://community.hubspot.com/u/docdaneeka)\
**Post date:** [February 19, 2025, 9:10pm UTC](https://community.hubspot.com/t/tutorial-setting-up-a-reverse-proxy-with-hubspot-cms-with-sample-nginx-cloudfront-configs/37034/30 "2025-02-19T21:10:24Z")

</div>

I’m looking for support on getting location-personalized content to work with a reverse proxy. We’ve had a reverse proxy set up for HubSpot for a while, but location-based content is not working correctly. We include the X-HubSpot-Trust-Forwarded-For: true header, and looking at the /\_hcms/diagnostics page for our hosted page, the Effective IP is the desired client IP for location-based content.  
These are the diagnostics results; I’ve redacted some of the information.

```auto
Current time: 2025-02-19T20:51:57.398Z
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Accept-Language: en
Accept-Encoding: gzip, br
Cookie: <not present>
Protocol: https
X-Client-IP: <not present>
True-Client-IP:{NAT gateway IP}
X-Real-IP: {NAT gateway IP}
X-Forwarded-For: 212.53.203.31, ...other IPs,{NAT gateway IP}
X-HubSpot-Trust-Forwarded-For: true
x-hs-public-host: <not present>
Edge-Determined Country: US
Edge-Determined Device Type: desktop
Effective IP: 212.53.203.31
Effective IP Source: X-Forwarded-For
IP-Determined Country: de
IP-Determined Region: hamburg
IP-Determined City: hamburg
IP-Determined Organization: artfiles new media
Host: ***.com
X-Forwarded-Host: ***.com

```

Despite the Effective IP and IP-Determined Country displaying correctly, location-based features are still not working. I see the Edge-Determined Country is still US like our gateway address. Could this be the source of the contents’ determined country?  
This is contradictory to the documentation that indicates that personalized-location content should work when the X-Forwarded-For IP is trusted. [https://developers.hubspot.com/docs/guides/cms/content/performance/reverse-proxy-support#:~:text=content%20based%20on-,location,-works%2C%20pass%20a](https://developers.hubspot.com/docs/guides/cms/content/performance/reverse-proxy-support#:~:text=content%20based%20on-,location,-works%2C%20pass%20a)  
Would appreciate any ideas from someone who’s seen a similar issue or knows which value actually powers HubSpot location features.

---

_[View the full topic](https://community.hubspot.com/t/tutorial-setting-up-a-reverse-proxy-with-hubspot-cms-with-sample-nginx-cloudfront-configs/37034)._
