# Reverse proxy on IIS server

**URL:** <https://community.hubspot.com/t/reverse-proxy-on-iis-server/70391>\
**Category:** CMS Development\
**Tags:** enterprise\
**Created:** [December 1, 2022, 5:20pm UTC](https://community.hubspot.com/t/reverse-proxy-on-iis-server/70391 "2022-12-01T17:20:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/denisg/32/197067_2.png) [@DenisG](https://community.hubspot.com/u/DenisG)\
**Post date:** [December 1, 2022, 5:20pm UTC](https://community.hubspot.com/t/reverse-proxy-on-iis-server/70391/1 "2022-12-01T17:20:32Z")

</div>

Hi,  
I’m trying to set up a reverse proxy for the blog by following this tutorial : [https://developers.hubspot.com/docs/cms/developer-reference/reverse-proxy-support](https://developers.hubspot.com/docs/cms/developer-reference/reverse-proxy-support)

The domain is configured on Hubspot and “Ready for publishing”.

The IIS server is configured to enable proxy. I have defined rewrite rules for [www.mydomain.com/en/blog](http://www.mydomain.com/en/blog) to [https://HubID.suffix/en/blog](https://HubID.suffix/en/blog)

(and also for **/\_hcms/\*** , **/hs/\*** , **/hubfs/\*** , \*\*/hs-fs/\*\*\*​, and **/cs/c/\*** )

The proxy seems to be correct, as it works if I change the rewrite rule to [www.google.com](http://www.google.com) for example)

But with the Hubspot URL, this is the page displayed.

 ![DenisG_0-1669914698931.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/5/1539a8f7f0d14b625f3a92709f6e338e5b5f41c8.png)

The diagnostic page doesn’t work too.

I can see the HTTP headers **x-hubspot-trust-forwarded-for** and **x-hs-public-host** , but there is also the following ones :

- **x-hubspot-notfound: true**

- **x-hs-reason: domain [XXXXX.sites-proxy.hscoscdn10.net](http://XXXXX.sites-proxy.hscoscdn10.net) does not exist**

I don’t know what I’m missing. Any help would be greatly appreciated 🙂

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 2, 2022, 7:01pm UTC](https://community.hubspot.com/t/reverse-proxy-on-iis-server/70391/2 "2022-12-02T19:01:44Z")

</div>

Hey, @DenisG 👋 Thanks for reaching out. I’ll tag in @coldrickjack @LeeBartelme [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) and add this post for reference — [Lessons Learned from Setting up a Reverse Proxy With HubSpot CMS (includes sample nginx config!)](https://community.hubspot.com/t5/CMS-Development/Lessons-Learned-from-Setting-up-a-Reverse-Proxy-With-HubSpot-CMS/td-p/435961)

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![DenisG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/denisg/32/197067_2.png) [@DenisG](https://community.hubspot.com/u/DenisG)\
**Post date:** [December 6, 2022, 8:30am UTC](https://community.hubspot.com/t/reverse-proxy-on-iis-server/70391/3 "2022-12-06T08:30:53Z")

</div>

Hi [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074),

Thanks for the link but it didn’t help.

I realised that I was not sending correctly the HTTP headers, now it’s ok, but still not working.

I’m seeing a 404 when going to the diagnostics URL [https://[myDomain]/\_hcms/diagnostics](https://yourFullDomain/_hcms/diagnostics).

Here are the headers from the [https://[myDomain]/\_hcms/\_worker/headers](https://yourFullDomain/_hcms/diagnostics)

```auto
accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9"
accept-encoding: "gzip"
accept-language: "en-US,en;q=0.9,fr;q=0.8,pt;q=0.7,es;q=0.6,fr-FR;q=0.5,pt-PT;q=0.4"
cache-control: "no-cache"
cf-connecting-ip: "[serverIp]"
cf-ipcountry: "NL"
cf-ray: "7753bf3d4cb2b902"
cf-visitor: "{"scheme":"https"}"
connection: "Keep-Alive"
cookie: ""
host: "[myHubId].sites-proxy.hscoscdn10.net"
max-forwards: "10"
pragma: "no-cache"
sec-ch-ua: ""Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108""
sec-ch-ua-mobile: "?0"
sec-ch-ua-platform: ""Windows""
sec-fetch-dest: "document"
sec-fetch-mode: "navigate"
sec-fetch-site: "none"
sec-fetch-user: "?1"
true-client-ip: "[serverIp]"
upgrade-insecure-requests: "1"
user-agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
x-arr-log-id: "148e19d4-faa1-4854-accd-68950963dac3"
x-arr-ssl: "2048|256|C=GB, S=Greater Manchester, L=Salford, O=Sectigo Limited, CN=Sectigo RSA Domain Validation Secure Server CA|CN=isdecisions.com"
x-forwarded-for: "185.182.168.24:57334"
x-forwarded-proto: "https"
x-hs-cfworker-source: "hs-cos-cdn-worker"
x-hs-public-host: "[www.myDomain.com]"
x-hs-zone-name: "hscoscdn10.net"
x-hubspot-trust-forwarded-for: "true"
x-original-url: "/_hcms/_worker/headers"
x-real-ip: "[serverIp]"

```

When visiting [https://www.mydomain.com/en/blog](https://www.mydomain.com/en/blog) I can see the following Request Headers :

x-hs-reason: domain [[www.mydomain.com](http://www.mydomain.com)] does not exist

x-hubspot-correlation-id: 479250b3-8597-49f3-a49a-50bdb42de334

x-hubspot-notfound: true

which means that the x-hs-public-host header is correctly configured right ?

So I don’t know what’s missing here.

---

<div class="post-metadata">

**Author:** ![DenisG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/denisg/32/197067_2.png) [@DenisG](https://community.hubspot.com/u/DenisG)\
**Post date:** [December 6, 2022, 2:13pm UTC](https://community.hubspot.com/t/reverse-proxy-on-iis-server/70391/4 "2022-12-06T14:13:55Z")

</div>

The domain status is now “Connected to reverse proxy”, so configuration looks ok, but pages are still “not available”.

 ![DenisG_0-1670336008508.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/8/b8bdd69d41fb4d0b19ffd79b296db5c3ee6246b0.png)
