# Set HTTP headers in plugin?

**URL:** https://meta.discourse.org/t/set-http-headers-in-plugin/30291
**Category:** Support
**Created:** [June 21, 2015, 8:49pm UTC](https://meta.discourse.org/t/set-http-headers-in-plugin/30291 "2015-06-21T20:49:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![calmh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/calmh/32/115466_2.png) [@calmh](https://meta.discourse.org/u/calmh)
#### Post date: [June 21, 2015, 8:49pm UTC](https://meta.discourse.org/t/set-http-headers-in-plugin/30291/1 "2015-06-21T20:49:49Z")

</div>

Is it possible to set HTTP response headers in a plugin? I’m looking at the various plugins that exist, but they all seem built around having areas of the page to hook into. I also can’t find any actual documentation on this…

I’d like to set `X-Robots-Tag noindex,nofollow;` on unlisted topics, to actually make them unlisted…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 21, 2015, 10:02pm UTC](https://meta.discourse.org/t/set-http-headers-in-plugin/30291/2 "2015-06-21T22:02:32Z")

</div>

I think that change is good globally, submit a PR

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [June 22, 2015, 2:28am UTC](https://meta.discourse.org/t/set-http-headers-in-plugin/30291/3 "2015-06-22T02:28:40Z")

</div>

> [@calmh](#):
>
> I’d like to set X-Robots-Tag noindex,nofollow; on unlisted topics, to actually make them unlisted…

I think we should do this regardless. I believe the last time @techapj looked this was not an easy change though.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [June 22, 2015, 6:01pm UTC](https://meta.discourse.org/t/set-http-headers-in-plugin/30291/4 "2015-06-22T18:01:39Z")

</div>

> [@codinghorror](#):
>
> I think we should do this regardless.

PR submitted.

[https://github.com/discourse/discourse/pull/3562](https://github.com/discourse/discourse/pull/3562)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [June 24, 2015, 5:13pm UTC](https://meta.discourse.org/t/set-http-headers-in-plugin/30291/5 "2015-06-24T17:13:31Z")

</div>


