# How do I generate a new CA with hostname?

**URL:** <https://discuss.elastic.co/t/how-do-i-generate-a-new-ca-with-hostname/305489>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [May 24, 2022, 10:51am UTC](https://discuss.elastic.co/t/how-do-i-generate-a-new-ca-with-hostname/305489 "2022-05-24T10:51:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![McLaine](https://avatars.discourse-cdn.com/v4/letter/m/5f8ce5/32.png) [@McLaine](https://discuss.elastic.co/u/McLaine)\
**Post date:** [May 24, 2022, 10:51am UTC](https://discuss.elastic.co/t/how-do-i-generate-a-new-ca-with-hostname/305489/1 "2022-05-24T10:51:41Z")

</div>

Hello!  
I need a new http\_ca.crt file with the [CN=hostname.net](http://CN=hostname.net)  
Instead of Subject: CN=Elasticsearch security auto-configuration HTTP CA.

But how?

Best  
Andy

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 24, 2022, 10:53pm UTC](https://discuss.elastic.co/t/how-do-i-generate-a-new-ca-with-hostname/305489/2 "2022-05-24T22:53:15Z")

</div>

Have you seen [Updating node security certificates | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/update-node-certs.html)?

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [May 25, 2022, 3:16am UTC](https://discuss.elastic.co/t/how-do-i-generate-a-new-ca-with-hostname/305489/3 "2022-05-25T03:16:12Z")

</div>

If it is only for HTTP, then you can keep the rest as is and regenerate your HTTP certificate/key material following [Set up basic security for the Elastic Stack plus secured HTTPS traffic | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/security-basic-setup-https.html#encrypt-http-communication)

It is however strange that you need a CA certificate with a specific subject. Are you sure you are not trying to use this as the HTTP certificate of a node ?

---

<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:** [June 22, 2022, 3:16am UTC](https://discuss.elastic.co/t/how-do-i-generate-a-new-ca-with-hostname/305489/4 "2022-06-22T03:16:22Z")

</div>

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