# Configure HTTP-server elasticsearch

**URL:** <https://discuss.elastic.co/t/configure-http-server-elasticsearch/259723>\
**Category:** Elasticsearch\
**Created:** [December 28, 2020, 11:02am UTC](https://discuss.elastic.co/t/configure-http-server-elasticsearch/259723 "2020-12-28T11:02:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmr84](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@wmr84](https://discuss.elastic.co/u/wmr84)\
**Post date:** [December 28, 2020, 11:02am UTC](https://discuss.elastic.co/t/configure-http-server-elasticsearch/259723/1 "2020-12-28T11:02:24Z")

</div>

Hi everybody!

I have configured the following parameters on my elasticsearch server  
http.host: [elasticsearch.company.com](http://elasticsearch.company.com)  
http.publish\_host: [elasticsearch.company.com](http://elasticsearch.company.com)  
http.bind\_host: [elasticsearch.company.com](http://elasticsearch.company.com)

I thought my server would filter http requests with incorrect HOST header after these settings.  
But everything remained the same.  
Tell me if it is possible to configure the elasticsearch server so that the server responds only to http requests with the correct HOST header.

---

<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:** [December 28, 2020, 1:02pm UTC](https://discuss.elastic.co/t/configure-http-server-elasticsearch/259723/2 "2020-12-28T13:02:03Z")

</div>

> [@wmr84](#):
>
> Tell me if it is possible to configure the elasticsearch server so that the server responds only to http requests with the correct HOST header.

No, it isn't, and please read this post before going any further in the direction you're heading:

> [@Is it safe to expose Elasticsearch to the Internet?](https://discuss.elastic.co/t/is-it-safe-to-expose-elasticsearch-to-the-internet/247041):
>
> TLDR - Elasticsearch is not designed to be exposed to the internet. To dig into this with more detail, here's more information taken from [this topic](https://discuss.elastic.co/t/is-it-safe-to-expose-elasticsearch-to-the-internet/246862/5). [This page](https://www.elastic.co/guide/en/elasticsearch/reference/current/ip-filtering.html#ip-filtering) in the docs says: NOTE: Elasticsearch installations are not designed to be publicly accessible over the Internet. IP Filtering and the other capabilities of the Elasticsearch security features do not change this condition. There's also [this page](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-security.html#_do_not_expose_elasticsearch_directly_to_the_internet) which says: Do not expose Elasticsearch to the Internet, instead have an application m…

---

<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:** [January 25, 2021, 1:02pm UTC](https://discuss.elastic.co/t/configure-http-server-elasticsearch/259723/3 "2021-01-25T13:02:12Z")

</div>

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