Why do I get this error after integrating Cloudflare on my website?

Hello I recently integrated Cloudflare on my website. But the bad thing is that after the integration their is no single user who can now access the website as it displays this messages to them.:point_down::point_down:Any assistance is highly appreciated please.Thanks.

The error itself is coming from your origin server, not Cloudflare, so either it was an issue on your server, or your Cloudflare configuration was doing something to the request that your server didn’t like.

Your site isn’t using Cloudflare now so it’s impossible to check…
https://cf.sjr.org.uk/tools/check?ea57a9d01c904dadbfb737625edb963d

If you switch back to the Cloudflare nameservers you can always “Pause Cloudflare” in the event of any problems rather than change nameservers which causes propagation confusion.

If you change the nameservers back to Cloudflare, post back if the problem appears and people can take a look.

I have connected to Cloudflare now you can check it

It is still showing that error

Now go into your origin server log and check for the reason for the 500 error.

(Interestingly, it worked here so there’s probably a header or something in the request your page script doesn’t like).

It’s still showing that error

Did you look at the log for the reason for the 500 error?

I have 2 almost indentical VPSs. One gets a 200 response all the time, one gets a 500 response all the time.

One server…

curl -I https://waygro.com
HTTP/2 200
date: Wed, 08 May 2024 06:05:28 GMT
content-type: text/html; charset=UTF-8
cf-edge-cache: cache,platform=wordpress
x-litespeed-tag: 53e_HTTP.200
link: <https://waygro.com/wp-json/>; rel="https://api.w.org/", <https://waygro.com/wp-json/wp/v2/pages/15625>; rel="alternate"; type="application/json", <https://waygro.com/>; rel=shortlink
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=VeCULpvCHnOFpXID5Cj2XzSbG0Qh8On55Ast9NPAjACt%2BcM4JU%2FtnlemmhFPubeALy2OQ1trQggre1UrlIiYgyR9POgz5R8t7uqlix94KiNS5Rbiznguy2us6u%2B01xujQG89i6Y1aW8A"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 88074212af4b7735-LHR
alt-svc: h3=":443"; ma=86400

The other…

curl -I https://waygro.com
HTTP/2 500
date: Wed, 08 May 2024 06:06:03 GMT
content-type: text/html; charset=iso-8859-1
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=b8sF54mJo9U6%2BV1y9WD%2ByIij%2FZXRfm1M2cKU8BiLf3UK3Z1npQu4liD1%2F7WU3BIqBy8zn%2F%2F%2FHmA%2B%2Fm9zdzoiVxT%2BwuWsSJyaE3CoNe21ewN2ekJuqraXDNGt%2F8Q1iuce6iFUlwl5%2Fe4F"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 880742f73d566367-LHR
alt-svc: h3=":443"; ma=86400

The reason will be in your server’s log so you need to look there.

What can be the possible solution and how can I handle it

As I said, you need to look in your server log file. It will tell you why the 500 error was returned.

Can you please guide me on how to go onto the origin server log coz I don’t know how to access it please

It depends on your OS. Likely under /var/log/httpd/error_log or /var/log/httpd/ssl_error_log or /var/log/apache2/error_log or /var/log/apache2/ssl_error_log or similar, depending on your distribution. It will show the 500 error and the reason for it.

On Cloudflare, check your SSL/TLS is “Full (strict)” in case that’s causing issues.

I can see from headers you are using APO as well. Wordpress and APO isn’t something I use so others may comment, but you can try turning off APO to see if there’s any issue with how that is integrated into your site.

Also check your Cloudflare DNS, do you have multiple records for the site, maybe one doesn’t work?

Thanks the guideline worked

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