# HSTS configuration for ElasticSearch

**URL:** <https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [November 16, 2026, 1:47pm UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637 "2026-11-16T13:47:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ektap](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@ektap](https://discuss.elastic.co/u/ektap)\
**Post date:** [November 16, 2026, 1:47pm UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637/1 "2026-11-16T13:47:06Z")

</div>

My elasticsearch version is 8.19.20, OS - Ubuntu - 22.04

Due to nessus scan we have detected HSTS Missing From HTTPS Server (RFC 6797) vulnerability on 9200 port. can you please help here how to resolve this?  
Please find the below screenshot

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/7/473eac320df2ae782fa633e6b5f8e1bbdfefba2b.png)

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [November 16, 2026, 2:57pm UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637/2 "2026-11-16T14:57:06Z")

</div>

Welcome to the forum

This has been asked and answered [before](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/260304), and [here](https://discuss.elastic.co/t/hsts-missing-from-https-server-for-elasticsearch/352694) too, which references the first thread.

---

<div class="post-metadata">

**Author:** ![ektap](https://avatars.discourse-cdn.com/v4/letter/e/a587f6/32.png) [@ektap](https://discuss.elastic.co/u/ektap)\
**Post date:** [November 17, 2026, 6:15am UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637/3 "2026-11-17T06:15:07Z")

</div>

can you please let us know when this setting is available in elasticsearch itself instead of proxy?

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [November 17, 2026, 10:49am UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637/4 "2026-11-17T10:49:05Z")

</div>

Er, from the linked posts:

"There is no option to enable HSTS in Elasticsearch other than to place a proxy in front of it"

Seems pretty definitive and clear, though was written in 2021. Subsequently

"The answer ... is still applicable."

was written in 2024.

I would hope if that is now no longer the case someone from Elastic would wish to correct me. I don't recall it mentioned in any release notes either.

I really don't wish to get into a semantics debate, but I would not personally class this as a "vulnerability", at least not as that term is typically used nowadays. But Nessus is a great tool, and I don't criticize you for checking/asking.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [November 17, 2026, 1:22pm UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/391637/5 "2026-11-17T13:22:34Z")

</div>

Yes what @RainTown said: HSTS makes no sense in this context. I would not expect it ever to be added to Elasticsearch.
