Bot hosted on glitch failing SSL handshake

I’ve written a basic twitch chatbot on Glitch that’s supposed to hit an API on our own website. It works perfectly fine with our test server, but on the main server (hosted on Cloudflare) any API call from the bot returns an Error 525: SSL handshake failed ( I’ve tried changing the port on the glitch app to 443 (fails to even run) and forcing the glitch app to https, but no success. The glitch bot is currently listening on port 3000, so I’m not sure if I need to allow that somehow on Cloudflare.

Any help would be appreciated. Again, it works on our test servers, but runs into SSL problems with Cloudflare.

Not sure what Glitch is, but it wouldn not work if your application is running on port 3000 and you want to proxy it through Cloudflare. Cloudflare only supported the ports listed at just allows you to host small projects for free.

I’ve tried all the ports listed, but still get Error 525.

I may misunderstand what proxy means, but we’re not trying to access the bot through Cloudflare. The bot is trying to call an api on, our website. is hosted using heroku and Cloudflare

Play around with your SSL settings. If there’s a Certificate installed you should use ‘Full’ or ‘Full (strict)’ here at Cloudflare.

We’re on Full (strict) at the moment. I saw a previous question where someone suggested disabling the certificate and re-enabling. Worth trying?

What’s the domain and, if you feel comfortable to reveal the server’s IP address, do so too.

our website is Honestly dont know how to find the IP. Sorry.

What did you configure in the DNS settings then?

justa heads up, we’re a small startup and our IT guy is no longer with us, so I’m the only remaining dev. Sorry in advance if i miss some obvious things

Sandro, I’m not totally sure how to answer your question.

All right, the site at actually loads. Can you post a screenshot of the issue you are having?

The error comes from our glitch program. The website itself is fine, it just blocks the bot from accessing the API. When we try to access the api through the bot, instead of a JSON object returned, I get the html for the “Cloudflare is unable to establish an SSL connection to the origin server” and a link to I’m not sure what end I need to change things on to make the ssl handshake pass

Can you post the exact URL you are trying to access from your application?

I was previously able to access it by going directly to the url above, but it’s now showing the 525 error with that as well, not just on the bot. Didn’t realize that had changed

Hmm. I’ve previously been able to acess all our apis, but now i cant access any of them appears to work.

I’d check the DNS settings on Cloudflare, whether they point to the right hosts. Works Does not
I see the www version works but without the www it does not.
Check your dns settings.

Got it. thanks guys!

This topic was automatically closed after 30 days. New replies are no longer allowed.