HubSpot Domain behind AWS CloudFront

Our current website is behind an AWS CloudFront distribution because the same domain serves multiple sites. One of these sites is moving to HubSpot. We have found and followed the documentation here (Accounts Dashboard | HubSpot) but are having issues at the last confirmation step. The time changes, the user-agent is right, the accept-language is good, cookie is not blank, protocoal is https, leftmost IP is my IP, but the IP-Determined Location is not right; it shows the CDN POP the origin request is coming from.

Results of `/_hcms/diagnostics`:

Hello @NEdwards

Not sure how I missed this, but are you still working on this problem?

Hi Dennis,

No we’ve moved on and decided to go about the problem from a different direction since this method isn’t officially supports/recommended.

Hi NEdwards,

Would you please share the different direction/solution as we are in the exact same situation (and have exhausted all HS support options - none)? We are considering another option, but would appreciate learning from your experience. Please consider emailing me at ruth@csrhub.com. Thanks.

REE,

We were never able to get support from our hubspot support contacts, and were a little turned off running it behind CloudFront because of all the warnings. We ended up re-designing and migrating the “sub-site” to another domain so that we can host it seperatly behind CloudFront. This is by no means ideal because it will affect our SEO, but we didn’t see much of another option.

@NEdwards @REE - While this post is slightly old, this should work now. There was an issue with case sensitivity of headers that is now resolved. You can see that referenced on this post: https://community.hubspot.com/t5/CMS-Development/HS-s-Reverse-Proxy-has-anyone-used-this-in-production/m-p/433629/highlight/true#M22837
The Cloudfront setup should work to show the IP location information of the originating client. I have a setup in AWS that is configured properly that I can privately share if you’re interested, just shoot me a DM.
Additionally, I just posted a thread that highlights a few ‘lessons learned’ that the HubSpot Tech Consulting team has seen regarding reverse proxy setup - https://community.hubspot.com/t5/CMS-Development/Lessons-Learned-from-Setting-up-a-Reverse-Proxy-With-HubSpot-CMS/td-p/435961