Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
_headers file and Astro - Cloudflare Developers
CD
Cloudflare Developers
•
15mo ago
•
6 replies
totallyinformation
_headers file and Astro
Hi all
, new to CF Pages and Astro
(static generated
)
. Even so
, I
've managed to create a nice blog site pretty quickly
.
However
, I want to make use of some custom headers but I can
't figure out how to make the Astro build process create a file called
_headers
_headers
in the dist root folder
. If I create a
/src/pages/_headers.js
/src/pages/_headers.js
, the Astro build ignores it
. If I rename to
headers.js
headers.js
it produces the correct output but with the wrong name
,
Can anyone guide me to the correct process please
? Thanks
.
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
_headers file in astro project
CD
Cloudflare Developers / pages-help
2y ago
_headers file issues
CD
Cloudflare Developers / pages-help
3y ago
Pages _headers file allow access JSON file
CD
Cloudflare Developers / pages-help
3y ago
How to implement nonce in _headers file?
CD
Cloudflare Developers / pages-help
14mo ago