What's causing these headers to be added to the response?

I have set up a few websites on the same server, and I’m using Cloudflare for them.

When I send a HTTP request directly to the server for each site (bypassing Cloudflare), I get a HTTP Response Header that looks like this:

HTTP/1.1 200 OK
Date: Sun, 30 Aug 2020 17:04:41 GMT
Server: Apache
Content-Type: text/html; charset=UTF-8

However, for one of the sites, when sending the request via Cloudflare I’m getting this response header:

HTTP/1.1 200 OK
Date: Sun, 30 Aug 2020 17:11:55 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: __cfduid=d676bed8f2a415f6f41de462c87491dd61598807515; expires=Tue, 29-Sep-20 17:11:55 GMT; path=/; domain=.domain.com; HttpOnly; SameSite=Lax
CF-Cache-Status: DYNAMIC
cf-request-id: 04e1f3baa30000063dbd996200000001
Server: cloudflare
CF-RAY: 5cb0223ddfab063d-LHR

All of the other sites keep the same headers as before. It’s just this one that’s getting the extra HTTP headers added by Cloudflare.

What would cause Cloudflare to add these headers to the response?

These are standard headers which get appended to each response going through Cloudflare.

Thanks Sandro. Why would the other websites running through Cloudflare not have these same headers added too?

All requests going through Cloudflare will have these headers. Of course they need to be proxied, but if they are not, they are not going through Cloudflare.

Which site do you believe is going through Cloudflare and does not have these headers?

(domain removed)

Not proxied, hence not going through Cloudflare :slight_smile:

You might also want to install an SSL certificate on your server as your site is currently not on HTTPS. No idea though how important that is for you.

Hmm, I’m not sure why that would be happening. I have pointed the DNS to Cloudflare, but the “Proxy status” is showing DNS Only.

The website with the headers added is Proxied.

I believe I have set both of the websites up in the exact same way. Why wouldn’t both be proxied?

P.S. Thanks for your help so far.

You need to toggle that to have it proxied.

And again, you need an SSL certificate on your server first - in case you do want HTTPS. If not, forget my statement :slight_smile:

1 Like

Okay I feel stupid now, didn’t realize clicking the cloud would toggle it on and off!

Thank you.

This topic was automatically closed after 31 days. New replies are no longer allowed.