HSTS on Pages

Hi, Is there a way to set the HSTS header on a Pages site? Our domain isn't managed by cloudflare (so most of the general cloudflare settings aren't available), but the website is deployed through Pages, so uses Let's Encrypt. When I google it, I mostly get back results relating to cloudflare sites other than Pages. I have all the relevant redirections set up on our own server for when anybody doesn't visit www. explicitly. Thanks
2 Replies
Hello, I’m Allie!
Cloudflare Docs
Headers | Cloudflare Pages docs
To attach headers to Cloudflare Pages responses, create a _headers plain text file in the output folder of your project. It is usually the folder that contains the deploy-ready HTML files and assets generated by the build, such as favicons. Changes to headers will be updated to your website at build time. Make sure you commit and push the file t...
blaze
blazeOP4mo ago
Thanks, that did it!
Want results from more Discord servers?
Add your server