I regards to getting a 520 when using curl, I tested it out a little more and found that if I spoof the user agent to something normal, it works properly. Is your server blocking based on user-agent?
You’ve also got some weird forwarding…
if somebody tries to access you as “http://www.karolgucfa.ml/” it redirects 3 times, 1st to “https://www.karolgucfa.ml/”, 2nd to “http://karolgucfa.ml/”, and then 3rd to “https://karolgucfa.ml/”
The first redirect is probably happening automatically via Cloudflare but you’d be better off using a Page Rule or Bulk Redirect to strip off the www at the same time so that the 2nd & 3rd redirects can be skipped.
The 2nd redirect, “https://www.karolgucfa.ml/” to “http://karolgucfa.ml/” is probably happening on your server, don’t redirect HTTPS to HTTP, that’s weird. Either fix it on your server or have Cloudflare do it via Page Rule or Bulk Redirect (you can combine with the above)
Redirect chain (with curl spoofing user agent to avoid the 520):
$ curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -IL 'http://www.karolgucfa.ml/'
HTTP/1.1 301 Moved Permanently
Date: Sun, 19 Jun 2022 01:18:22 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Sun, 19 Jun 2022 02:18:22 GMT
Location: https://www.karolgucfa.ml/
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=ay87S0ZYq2K%2BBo5nSS%2FOyVuMcBfI4n513VHkJe0Yg9trMGUkIVTS%2FONo1X%2FHU9j0jUe2oc1VNERaR5ZETlSKZqnrPiDtBiioLKdRwQvJ6yV37glPCQMVRtYDa3YwyzJiSvMsKkL%2Ffsk2LhKg3p7WrQ%3D%3D"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 71d86e2cffa08717-ORD
alt-svc: h2=":443"; ma=60
HTTP/2 301
date: Sun, 19 Jun 2022 01:18:28 GMT
content-type: text/html; charset=UTF-8
location: http://karolgucfa.ml/
x-redirect-by: WordPress
cache-control: max-age=0
expires: Sun, 19 Jun 2022 01:18:27 GMT
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=RTIDdGRTx9%2FP5rZ7WnxBb3QkP2L38QRt8YZy50QcLuuPDIv%2FL5D2u%2FMxKkqmW0skdvkUt%2F4Unwe5GXtPmM17RqO%2FyVJJP1H9XYRn4hfwoJrxtL45K%2Btf7uide%2FfS9cOqTiHC5fe3nm3AtlQSyR1xwQ%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 71d86e504b452cb3-ORD
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
HTTP/1.1 301 Moved Permanently
Date: Sun, 19 Jun 2022 01:18:28 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Sun, 19 Jun 2022 02:18:28 GMT
Location: https://karolgucfa.ml/
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BaXNBRxCJAnT1q5Kg4yXMGEvw24DXww6arUbysinNf9aWtgmOh6d%2B7nHjLCMUriY9OJ8vNHinn2wy570buQWoEhJ2nqRpq%2B9vvd%2BspbxkW0yJIqF5nK6Mqd2pnnxXDUDItR0zic3Fshpu7wZ"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Server: cloudflare
CF-RAY: 71d86e54fdf20388-ORD
alt-svc: h2=":443"; ma=60
HTTP/2 200
date: Sun, 19 Jun 2022 01:18:29 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
link: <http://karolgucfa.ml/wp-json/>; rel="https://api.w.org/"
link: <http://karolgucfa.ml/wp-json/wp/v2/pages/28>; rel="alternate"; type="application/json"
link: <http://karolgucfa.ml/>; rel=shortlink
cache-control: max-age=0
expires: Sun, 19 Jun 2022 01:18:28 GMT
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=o8epcRdYw1jZLg4Z0LxVawbR4AgqD1UM%2B4Z%2F9oV694T2LB7wDtEeYda%2Bk5ZmYeO4BGf4gB7jMwxJPb34tnlQcOWl35xXIydRA48s3RRaotUOQUpK6%2F2y1SpX2p2uvyGZgaZFaJBLZX0Wh50W"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 71d86e563b14868a-ORD
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
520 when using curl without spoofing user-agent:
$ curl -IL 'https://www.karolgucfa.ml/'
HTTP/2 520
date: Sun, 19 Jun 2022 01:19:26 GMT
content-length: 0
cache-control: no-store, no-cache
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=U1w9TSDlYboqOGaKqq%2BnenMcDttDm5wawmK%2Feq4qT0Wb0%2F9Vpqf54gtJn%2F8uT7fXcu%2BDtQyFYgetq4gTmQsBcE5%2BZtBiThFwaC9JxWNWX1WNCbncStn7C12Ny6F0YeAUAEFTw4Vs7C52HiPDehW9vg%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 71d86fbd0e3cf222-ORD
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400