# Subscriptions working on localhost but not working on host

**URL:** https://community.apollographql.com/t/subscriptions-working-on-localhost-but-not-working-on-host/1252
**Category:** Server
**Tags:** server
**Created:** [August 31, 2021, 10:45am UTC](https://community.apollographql.com/t/subscriptions-working-on-localhost-but-not-working-on-host/1252 "2021-08-31T10:45:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hichamlehouedj](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/hichamlehouedj/32/832_2.png) [@hichamlehouedj](https://community.apollographql.com/u/hichamlehouedj)
#### Post date: [August 31, 2021, 10:45am UTC](https://community.apollographql.com/t/subscriptions-working-on-localhost-but-not-working-on-host/1252/1 "2021-08-31T10:45:17Z")

</div>

When I request any subscription on the local server it works fine but does not work on the hosting server and at the same time the rest of the queries work correctly.

This is the error message:

“error”: “Could not connect to websocket endpoint wss://example.com/graphql. Please check if the endpoint url is correct.”
