First connections fail when web forwarding via a domain



First connections to a Shiny app via new domain name fail when URL contains hash arguments.

I have a Shiny app running on an Apache server on an AWS instance. Connecting to it via public IP address it works fine. I've just implemented a web domain via 3rd party provider. The web forwarding is working generally ok, but when I call the app with a hash argument (e.g. http://mydomain:9000/#q=xxx) the connection fails. E.g. in Chome with WebSocket connection to 'ws://mydomain:9000/websocket/' failed: Connection closed before receiving a handshake response. When I refresh the page however it works.

Any idea why it's failing, or suggestions to strengthen the initial connection?