Home Assistant Behind IIS Reverse Proxy Returns 400: What to Check

Home Assistant Behind IIS Reverse Proxy Returns 400: What to Check. AutoMatter

A Home Assistant owner posted on the community forum on October 23 that their instance returns 400 Bad Request when reached through an IIS reverse proxy. It works fine on the local IP, and the same proxy serves a static page from the same VM without trouble. They report running 2026.10.3. This is one person’s report and it has no confirmed fix yet, so treat it as a lead, not a known bug. Here is what the thread shows and what we would check.

What the log says

The poster had turned on Trust X-Forwarded-For and tried several trusted-proxy entries, including the proxy’s own address, a /24, a /16 and 0.0.0.0/0. The log kept showing the same message from the HTTP component: Invalid IP address in X-Forwarded-For, followed by their laptop’s address with a port attached (for example 192.168.1.75:24422). The port changed on each attempt. Their packet capture showed the header carrying the laptop address.

That detail matters. The complaint is about the format of the client address in the header, not about whether the proxy is trusted. If that is the cause, widening the trusted list would not help, which fits what the poster saw. We cannot confirm it from the thread, and nobody there has yet.

What the official docs say

The HTTP integration page is clear on the basics:

  • Behind a reverse proxy, turn on Trust X-Forwarded-For and add the proxy to Trusted proxies. Requests from proxies are blocked otherwise.
  • When you enter a network mask, use the network address (192.168.1.0/24), not a host address (192.168.1.50/24). The poster’s list included 192.168.1.0.0/24 as written, which looks like a typo worth double-checking.
  • The docs name NGINX, Caddy, Traefik and HAProxy as traditional reverse proxies. IIS is not mentioned either way.

Since 2026.8 these settings live in the UI under Settings > System > Network, not in configuration.yaml. Saving restarts Home Assistant, and an administrator must confirm the new settings. If you do not confirm within 5 minutes, Home Assistant reverts to the previous ones. If you edited trusted proxies and saw no change, that timeout is worth ruling out.

What to check on an installed system

  • Look in Settings > System > Repairs for a leftover http: block from before 2026.8, and remove it once the UI values are correct.
  • Check the proxy’s trusted entry is the proxy’s address or a correctly written network address, not a wide-open range.
  • Read the Home Assistant log for the exact X-Forwarded-For text. If the client address has a port on it, the problem is likely in what the proxy sends.
  • If you cache at the proxy or CDN, the docs say not to cache HTML, the service worker files, or /api/ and /auth/ paths.
  • Before updating, note your working proxy settings so you can compare afterwards.

What owners are asking

Is IIS supported as a reverse proxy? There is no confirmed answer. The docs list other proxies by name and do not mention IIS. Some forum replies urged switching to NGINX, but nobody showed that IIS itself is the fault, and the poster says IIS proxies other services fine. For a new setup, using a proxy the docs name is the safer path.

Is it safe to trust 0.0.0.0/0? We would not. Trusted proxies are the addresses allowed to set X-Forwarded-For, so the list should be as narrow as your proxy’s real address. The docs describe it as the proxy list, not a general allow list.

Do I need a proxy at all for remote access? Not if you use Home Assistant Cloud. The docs say its requests arrive through a secure tunnel, and the proxy settings have no effect on them. We covered that service in our earlier post on Home Assistant Cloud Becomes Home Assistant Link.

Where this stands

We found no matching open issue in the HTTP integration issue list, which shows 18 open items, none obviously about this. The full thread is on the Home Assistant forum. If your proxy runs fine today, there is no reason to change it. If you plan to update, keep a note of your settings and a way to reach Home Assistant locally in case the proxy path breaks.

Sources