# Custom domain for deployment - TLS certificate

**URL:** <https://discuss.elastic.co/t/custom-domain-for-deployment-tls-certificate/312376>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [August 18, 2022, 11:26am UTC](https://discuss.elastic.co/t/custom-domain-for-deployment-tls-certificate/312376 "2022-08-18T11:26:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edweis](https://avatars.discourse-cdn.com/v4/letter/e/3be4f8/32.png) [@edweis](https://discuss.elastic.co/u/edweis)\
**Post date:** [August 18, 2022, 11:26am UTC](https://discuss.elastic.co/t/custom-domain-for-deployment-tls-certificate/312376/1 "2022-08-18T11:26:58Z")

</div>

Hi,  
I want to have a custom endpoint `es.mydomain.com` that redirects conditionally to the closest Elasticsearch deployment to improve the latency of my Elasticsearch cluster in different regions.

I have deployments in US and in Singapore. I manage to create DNS rules to redirect US requests to the US deployment, and other requests to Singapore deployment.

However, in order to `es.mydomain.com` to work with [elastic.co](http://elastic.co) I need to connect with HTTPS, hence I need to set up a TLS certificate. More than a year ago this question was asked [there](https://discuss.elastic.co/t/elastic-cloud-custom-domain/214853/3) and the [elastic.co](http://elastic.co) team mentioned the feature is not supported.

How can set up TLS certificate in [elastic.co](http://elastic.co) ?  
Otherwise, what is the best practice to route client requests to the nearest Elasticsearch deployment?

Thank you

---

<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:** [September 15, 2022, 11:27am UTC](https://discuss.elastic.co/t/custom-domain-for-deployment-tls-certificate/312376/2 "2022-09-15T11:27:51Z")

</div>

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