# HTTPS support to Elasticsearch

**URL:** <https://discuss.elastic.co/t/https-support-to-elasticsearch/57028>\
**Category:** Elasticsearch\
**Created:** [August 2, 2016, 3:15pm UTC](https://discuss.elastic.co/t/https-support-to-elasticsearch/57028 "2016-08-02T15:15:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivc](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vivc](https://discuss.elastic.co/u/vivc)\
**Post date:** [August 2, 2016, 3:15pm UTC](https://discuss.elastic.co/t/https-support-to-elasticsearch/57028/1 "2016-08-02T15:15:56Z")

</div>

Elasticsearch queries are not getting executed using https. Please suggest configuration to be done to make elastic search work with https.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [August 2, 2016, 3:34pm UTC](https://discuss.elastic.co/t/https-support-to-elasticsearch/57028/2 "2016-08-02T15:34:03Z")

</div>

Elastic has a [product](https://www.elastic.co/products/shield) that does that and has lots of other fancy security features. I'm sure it is possible to reverse proxy with nginx or stunnel or your favorite thing. It isn't the same thing, but it is something.

---

<div class="post-metadata">

**Author:** ![vivc](https://avatars.discourse-cdn.com/v4/letter/v/ce7236/32.png) [@vivc](https://discuss.elastic.co/u/vivc)\
**Post date:** [August 2, 2016, 3:45pm UTC](https://discuss.elastic.co/t/https-support-to-elasticsearch/57028/3 "2016-08-02T15:45:10Z")

</div>

Currently the relastic search request send from custom UI to Elastic search was working fine with http. But during deployment in the development environment the request are by default send as https.

So did you mean with out shield the https queries would not work . Getting the following error for the query.

Request:  
[https://147.117.52.29:9200/?hello=elasticsearch](https://147.117.52.29:9200/?hello=elasticsearch)

ERROR:

" elasticsearch.js:53072:5  
ERROR: 2016-07-28T14:55:30Z  
[31]\</Log.prototype.error@https:///elasticsearch-js/elasticsearch.js:52758:56  
checkRespForFailure@https:///elasticsearch-js/elasticsearch.js:53533:9  
[28]\</XhrConnector.prototype.request/xhr.onreadystatechange@https:///elasticsearch-js/elasticsearch.js:52118:7

I've found the following link does it work.

[https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/auth-reference.html). I tried to make the changes mentioned by adding user and password in the host url but doen't work.

var client = new elasticsearch.Client({  
host: '[https://user:password@my-site.com:9200](https://user:password@my-site.com:9200)'  
})

---

<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:** [July 5, 2017, 10:30pm UTC](https://discuss.elastic.co/t/https-support-to-elasticsearch/57028/4 "2017-07-05T22:30:41Z")

</div>


