Bot failing SSL handshake with cloudflare



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.

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


Hi @CaldwellClarke, thanks for reaching out about this issue. Can you send me a link to the Glitch project for your chatbot? That should help us debug further.

  • Lyzi from Glitch


Yeah! not sure which link you need, so I included a couple:


Hi @CaldwellClarke – unless I’m missing something, this issue may be on the API end. Any GET requests I make to the endpoints in your app ( for example) are returning a 525 from CloudFlare regardless of how I’m making the request (from Postman, in my browser, etc). Can you verify that you’re also receiving 525s when you hit your API? Thanks!


Hey Lyzi,

That’s the exact problem. When i call my test server (replace with, it works perfectly fine. The main server is hosted on Cloudflare, hence the issue with only the domain. It’s saying that the origin server (im assuming that’s my glitch bot in this situation) needs to listen on port 443, but setting that port in .env causes the bot to not run entirely.

I’m not sure what end i need to alter things on to have the ssl handshake pass.


oh. Looks like I misunderstood. I cant even access them on my own now by typing the url


Ah cool, glad to see we’re seeing the same thing! If you find anything Glitch-specific that’s creating an error, please let us know.


got it solved. Silly mistake on my part. The test server doesnt have www. as part of the url. the main url does. Thanks again for the help!