# Invalid response in a curl request

**URL:** <https://forum.infinityfree.com/t/invalid-response-in-a-curl-request/78749>\
**Category:** Hosting Support\
**Created:** [July 9, 2023, 1:28pm UTC](https://forum.infinityfree.com/t/invalid-response-in-a-curl-request/78749 "2023-07-09T13:28:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [July 9, 2023, 2:20pm UTC](https://forum.infinityfree.com/t/invalid-response-in-a-curl-request/78749/3 "2023-07-09T14:20:12Z")

</div>

All that I see in the long command output is that you are using Cloudflare and Clouflare said your site is down.

The weird thing is that when I try to access your site with cURL, I also get the 520 error. But when I try to open it in a browser, I get a redirection loop error.

In the Network tab, I see that these redirects have the header `x-redirect-by: WordPress`. And WordPress and Cloudflare don’t work together out of the box, because WordPress doesn’t handle HTTPS properly when using Flexible SSL.

The recommend way to fix this is to use Full SSL instead, which is pretty sure and pretty easy to setup:

> [@How to setup Full SSL with Cloudflare](https://forum.infinityfree.com/t/how-to-setup-full-ssl-with-cloudflare/60679):
>
> By default, Cloudflare uses a system called “Flexible SSL”. In this system, Cloudflare secures the connection between your visitors and Cloudflare, but not the connection between Cloudflare and your website. Not only is this less secure, some websites (notably WordPress) have trouble detecting whether HTTPS is in use, causing all sorts of issues. The best way to resolve this is by using Full SSL in Cloudflare. This way, the connection between Cloudflare and your website is encrypted, and your w…

Alternatively, if you’d rather use Flexible SSL, this is how you can make it work with WordPress:

> [@How to make Cloudflare Flexible SSL work with WordPress](https://forum.infinityfree.com/t/how-to-make-cloudflare-flexible-ssl-work-with-wordpress/49362):
>
> WordPress is a great and very popular website building tool, and Cloudflare is a great way to get HTTPS on your website for free. Thanks to Cloudflare’s Flexible SSL system, you don’t even need to manage SSL certificates to use it! However, getting WordPress to show a padlock and make all pages work can be a bit tricky. This article explains a good way to configure your website correctly with Cloudflare Flexible SSL. Heads up! Instead of making WordPress work with Flexible SSL, you can also c…

I’m confident that doing this will fix your website. What will happen to the cURL result, I don’t know, but I’m guessing that will work too.

---

_[View the full topic](https://forum.infinityfree.com/t/invalid-response-in-a-curl-request/78749)._
