522 error with heroku app just in some countries/locations


I have a site hosted in heroku with two domains. botonesdeayuda.org is loads ok but helpbuttons.org shows 522 error in some countries/locations . They are both in cloudflare with A and CNAME records. Any idea of why is this happening? Thank you.

I am not getting a 522 but a 526

You seem to have configured an Origin certificate but maybe you did not roll it out everywhere where necessary. Double check that.


Is their a high amount of traffic coming from the country returning the 522 error?

Yes, I got a 526 as well!

No, just one or two persons

Ok, thanks, won’t try that

Just double check aforementioned item.

It’s from Troubleshooting Cloudflare 5XX errors – Cloudflare Help Center so, maybe update the thing so it doesn’t have bad steps!

So you are just copy-pasting?

Perhaps it’s a network error on their end because it’s only showing 522 or 526 on one or two IP’S?

Yes that message was copy/pasted but now you need to change that page up because it contains inaccurate information

Users from Italy are getting 522, and you seem to have a 526.

1 Like

And I’m in the united states. What about you @sandro, you in the US as well and getting the same error as me?

It does not really matter I am afraid, it’s your posting and your content and your responsibility in this case.

Ok, I’ll revoke the post

@wef, it’s not user related. You have an invalid certificate. Did you check what I mentioned twice?

Invalid? And why the same certificate works for the other domain?

I mentioned before what to do here.

One is expired, the other is not

Also, some requests do go through, whereas others either time out or return the 526.


That would suggest that your server returns different responses based on the Cloudflare PoP, my best guess would be your configuration was not properly rolled out and was only partially applied.