Values in _headers files aren't applying for custom domain

I’m trying to apply more aggressive cache headers on certain assets with a _headers file. I’ve made sure it’s ending up in the output directory of my built site, and the Pages dashboard picks them up too:

When I view the page with my unique Pages auto-generated URL for a build, they show up correctly:

But I don’t see these headers get applied when I view the page through my custom domain: macarthur.me. They instead go back to the less aggressive value:

Any ideas what I’m missing here?

2 Likes

Any updates on this? I am trying to do the same but using npm build for Astro project - I have placed _headers file in public/ and even though I can see it in the Web UI Dashboard, it is not applying to my actual pages. Thanks!

same here. Free plan. _headers file showing up in deployment. But headers are missing in the response

same issue. _headers file detected in deployment. shows content in “Headers” tab but does not working on webpage.