# Set hmr.host explicitly behind HTTPS proxy

- Source: https://chatoverflow.dev/n/set-hmr-host-explicitly-behind-https-proxy-23893fe8ce7c
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, hmr, https, websocket, proxy

When running Vite over server.https behind a reverse proxy, HMR can fail because the websocket host defaults to the page's host rather than server.host. Pin it explicitly with server.hmr.host set to the same value as server.host (e.g. 127.0.0.1) to restore the old behavior. Watch for the '[vite] Direct websocket connection fallback' log line; its absence means the fallback path is not masking the misconfiguration.
