Error 520: Web Server Is Returning an Unknown Error (Siteground hosting)

This has happened several times over the past 24 hours on the Wordpress site.

It’s an intermittent error, so it’s difficult to replicate, and it’s normally gone when the page is reloaded. However, as it has happened multiple times for a least a day, and most recently in the past half hour, I need to know if there is a problem I should get fixed.

The website is hosted at Siteground and I have already contacted their support who have just told me that:
“I was not able to replicate the case and I was not able to find any 502 (must be a typo) errors on the hosting server, which leads me to believe that the issue could be related to the CLoudFlare’s CDN.”

I have looked at other pages in this community relating to this error such as this “/t/error-520-web-server-is-returning-an-unknown-error/317314”.

However the SSL is fine as far as I can see.
Pausing Cloudflare and clearing cache makes no difference.
I’ve tried different browsers, all the same.

I hope someone can help me troubleshoot the error.

Also, is there a way to access error logs, as I hope they might provide some information that could help Siteground with troubleshooting. I have searched for logs, but I can’t find the logs mentioned on this page “cloudflare /network-error-logging/get-started/”

Thanks all. I hope someone can help. Have a great weekend.

2 Likes

OK so it seems there was an issue with the SSL on Siteground after all.

In the past Cloudflare error messages were quite clear that it was an SSL Error, that seems to have changed to this Unknown Error.

I’m literally having the same issue (Random 520/525 Errors With Cloudflare Origin Cert) and I have SG as well. They said a lot of customers who use Cloudflare have been having this issue.

It’s random and I did get them to replicate it but they say their servers are fine.

I noticed that if I removed the CF origin cert and installed SG Let’s Encrypt, the error went away or at least I could not do anything to populate the error.

I’d sometimes get a 525 error too.

Also, for some reason the CABundle is shown as invalid on SG when importing a new origin CA. I used to have to have it but apparently it’s not required by SG anymore.

1 Like

Cool you got it stored out @Terms_G

I should explain exactly what my issue and solution was to help others.

My SSL certificate expired a few weeks ago, and today I was told that because I use Cloudflare nameservers Siteground’s system thinks the website is now hosted elsewhere, and this is the reason Siteground did not inform me that the automatic renewal of the SSLC had failed.

What is strange is that despite the certificate expiring weeks ago, the site has been working fine until yesterday, and as explained above, it still worked normally most of the time.

You see, this has happened many times before, but normally the site displays an error straight away, and I am aware that I need to disable Cloudflare for a couple of minutes to manually renew the certificate, but every other time this has happened Cloudflare normally gives me an accurate error explaining that the problem is the SSL, not this Unknown Error.

Siteground are great in my experience, and I have suggested to them that they simply notify customers who use Cloudflare nameservers that a SSL renewal has failed. To me that sounds like a simple and logical solution that would save Siteground and their customers some time and stress, but implementing that suggestion may not be as easy as I imagine it is.

1 Like

I’m experiencing the same issue, also hosting with SG. Just renewed SSL certificate (though it said it was good until the end of September…). Hope this resolve the issue. Hanging out here in case any other news about this comes up.

If these are Let’s Encrypt certificates, you may be able to adjust your Cloudflare settings to accommodate the renewal without pausing Cloudflare.

1 Like

I have just discovered that the problem still exists, even though the SSL certificate is now renewed.

So I’m back to square one.

Yes my problem has returned.

I was wondering if maybe I had to wait a bit for the new certificate you know… but reading your comment about having a valid certificate makes me think it’s nothing to do with the certificate at all.

I’m at a loss.

Ah good to know, thanks @epic.network

What’s the status of your problem. Mine has returned :rage:

Siteground has suggested that I make this adjustment.
Can you please confirm that all I need to change is the “example-com” bit.
Thanks.

Yes. Replace example.com with your domain. The Cloudflare setting of Always Use HTTPS should not be enabled globally for your site as it will interfere with that rule. You can use another rule after the acme-challenge rule to enable that setting if you wish.

1 Like

Mine is gone. Not sure how or why but I cannot get it to populate the 520 error message.

I still have the CF Origin Cert too.

I am, however, getting the same errors in Site Health of WordPress. Not sure if you use WP but if you do, check Site Health via the Tools tab and see if you find:

  • The REST API encountered an unexpected result
  • Your site could not complete a loopback request

Make sure that you allow your server IP in your Cloudflare configuration.

1 Like

I did that several years ago I completely forgot about it. My host updated the servers and the IP changed so I just updated that and those two errors are now gone.

Thanks!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.