I have a Cloudflare website and it is hosted on Cloudflare Pages, but I want to add HTTP headers to this website. There are a lot of DNS and HTTP related settings in Cloudflare. I am undecided which one to do.

My question is How can I add http headers in Cloudflare?

1 Answer 1


Follow the steps below to add HTTP headers in Cloudflare:

  1. Select your website.
  2. Click Rules from the left side menu.
  3. Click Transform Rules in the menu that opens under Rules.
  4. There are 4 different options in Transform Rules, but not in the menu, but in the page section, select Modify Response Header from this page section.
  5. Press the Create Rule button.
  6. In the first Rule Name section, type any name you want, just any importance to personalise it.
  7. When incoming requests match... question, if you are going to add HTTP header to the whole site, click All Incoming Requests option, if you are going to select a specific page, select the 2nd option there and apply the filtering.
  8. Press the Set New Header button to add the HTTP header under the Then section.
  9. In the Set Static section, select the Static section and type the HTTP header you want to enter in the 2 boxes that appear.
  10. Press Save and the HTTP header is now added.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.