# Setting response headers only on documents

**URL:** <https://answers.netlify.com/t/setting-response-headers-only-on-documents/6144>\
**Category:** Support\
**Tags:** headers\
**Created:** [December 12, 2019, 2:09pm UTC](https://answers.netlify.com/t/setting-response-headers-only-on-documents/6144 "2019-12-12T14:09:42Z")\
**Posts on this page:** 1\
**Showing post:** 28

<div class="post-metadata">

**Author:** ![jen](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/jen/32/6044_2.png) [@jen](https://answers.netlify.com/u/jen)\
**Post date:** [July 28, 2020, 10:53pm UTC](https://answers.netlify.com/t/setting-response-headers-only-on-documents/6144/28 "2020-07-28T22:53:25Z")

</div>

Hey @Nakib,  
I believe we answered your above question over here:

> [@Format of custom headers glob](https://answers.netlify.com/t/format-of-custom-headers-glob/13037/8):
>
> Why it is not working in my case. `[[headers]] for = “/*.js” [headers.values] cache-control = “max-age=31536000” for = "/*.css" [headers.values] cache-control = "max-age=31536000" for = "/*.woff" [headers.values] cache-control = "max-age=31536000" for = "/*.png" [headers.values] cache-control = "max-age=31536000" ` Here only the .js file gets bundled but in the network tab, I see for: “/\*.png” on bundle.js header. That means bundle.js is getting the header for “/\*png”. Why? A…

As for the `*.html` files, you will not be able to accomplish what you want today. This comment explains:

> [@Setting response headers only on documents](https://answers.netlify.com/t/setting-response-headers-only-on-documents/6144/12):
>
> Yes, but my pages (like many folks’) are not served with a ‘.html’ extension, try [https://5e00e2e86a200d0007b165cf--simonhearne.netlify.com/](https://5e00e2e86a200d0007b165cf--simonhearne.netlify.com/) instead of [https://5e00e2e86a200d0007b165cf--simonhearne.netlify.com/index.html](https://5e00e2e86a200d0007b165cf--simonhearne.netlify.com/index.html) So what I think you are saying is that it is impossible to set different headers for documents served at directory roots.

We’ve opened a feature request and have added your +1 to it. We’ll definitely update here if there’s any movement on that!

---

_[View the full topic](https://answers.netlify.com/t/setting-response-headers-only-on-documents/6144)._
