I canot add security headers properly

I have a client website that has my CF DNS and even if I added to “Tools → transform rules → Modify response header” the following security headers (see picture) I still cannot see the results when I validate the domain



Need help how to add security headers with cloudflare. I don’t have access to FTP to change .htaccess entries

Your site isn’t proxied (it is set to “DNS only”) so requests are going direct to your origin server and not through Cloudflare, so Cloudflare cannot modify anything.
https://cf.sjr.org.uk/tools/check?ced55863635b4561981eb5111e3464d8#dns

2 Likes

Thank you so very much for the reply.
What happened if I use Cache → Cache Rules like in the following image. In order to take affect should I check Proxy switch in DNS tab too or it’s enough to set only Cache rules?

The main question is that if I set proxy in DNS tab CF caches everything or what is set up in Caching → cache rules" ?
I work on an online shop that does not need to cache pages cause they change the prices for products but I’d like to cache images and js and css. What is the best practice for it?
And meanwhile I tried and indeed if I set the proxy settings the headers are present. So that part is solved.

Cloudflare’s default caching process is described here…

You can modify it, to cache more or less, including for all or none of the whole hostname, using Cache Rules…

As always, if you want to use Cloudflare features, then the DNS record must be proxied or requests don’t pass through Cloudflare.

1 Like

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