Skip to content

Tools/CF _headers

CF _headers

Build Cloudflare Pages _headers and _redirects stubs. Nothing is uploaded.

Loading tool…

How to use CF _headers

  1. 1. Set a path and header. /* is the usual catch-all.
  2. 2. Add a redirect row. from, to, status.
  3. 3. Copy _headers and _redirects. Place them in the Pages output root.
  4. 4. Not a deploy. This tab does not talk to Cloudflare.

About this tool

Cloudflare Pages reads _headers and _redirects from the build output. This tool writes those files so you can paste X-Frame-Options or a 301 without memorizing the syntax.

Static only

No Workers, no transform rules.

Status

301 and 302 are the usual values. 200 rewrites are a different product feature.

Code examples

_redirects

/old /new 301

Frequently asked questions

Related tools

All tools