# HSTS configuration for ElasticSearch

**URL:** <https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/260304>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 6, 2021, 9:10am UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/260304 "2021-01-06T09:10:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravi\_GH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravi_gh/32/71311_2.png) [@Ravi\_GH](https://discuss.elastic.co/u/Ravi_GH)\
**Post date:** [January 6, 2021, 9:10am UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/260304/1 "2021-01-06T09:10:17Z")

</div>

We have HSTS vulnerability for Elasticsearch server (v7.5.2 & v6.8.6) as mentioned @ [https://www.tenable.com/plugins/nessus/142960](https://www.tenable.com/plugins/nessus/142960)

How to enable HSTS for the elasticsearch server.

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [January 7, 2021, 12:13am UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/260304/2 "2021-01-07T00:13:20Z")

</div>

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

However, because Elasticsearch can only listen on _one_ of HTTP or HTTPS, but not both simultaneously, it is not susceptible to downgrade attacks, unless they are also accompanied by DNS hijacking.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 4, 2021, 12:13am UTC](https://discuss.elastic.co/t/hsts-configuration-for-elasticsearch/260304/3 "2021-02-04T00:13:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
