# Set tls using elasticsearch high level REST API

**URL:** <https://discuss.elastic.co/t/set-tls-using-elasticsearch-high-level-rest-api/189329>\
**Category:** Elasticsearch\
**Created:** [July 8, 2019, 10:55am UTC](https://discuss.elastic.co/t/set-tls-using-elasticsearch-high-level-rest-api/189329 "2019-07-08T10:55:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xodn0812](https://avatars.discourse-cdn.com/v4/letter/x/c5a1d2/32.png) [@xodn0812](https://discuss.elastic.co/u/xodn0812)\
**Post date:** [July 8, 2019, 10:55am UTC](https://discuss.elastic.co/t/set-tls-using-elasticsearch-high-level-rest-api/189329/1 "2019-07-08T10:55:02Z")

</div>

i want to set tls by using elasticsearch high level REST API.  
how can do??

I refer to the site below, but I do not know how to create a keyStore.  
Do I have to create a .jks file?

[https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/\_encrypted\_communication.html](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/_encrypted_communication.html)

---

<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:** [July 9, 2019, 9:14am UTC](https://discuss.elastic.co/t/set-tls-using-elasticsearch-high-level-rest-api/189329/2 "2019-07-09T09:14:27Z")

</div>

> [@xodn0812](#):
>
> i want to set tls by using elasticsearch high level REST API.

You need to provide more details.  
You enable TLS by setting the scheme (protocol) to `https` in the 3rd argument to `HttpHost`.

If you wish to configure the TLS settings, then you will need to tell us exactly what you're trying to configure so that we can give you relevant advice.

---

<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:** [August 6, 2019, 9:15am UTC](https://discuss.elastic.co/t/set-tls-using-elasticsearch-high-level-rest-api/189329/3 "2019-08-06T09:15:18Z")

</div>

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