# Hostname as a common name in node certificate

**URL:** <https://forum.yugabyte.com/t/hostname-as-a-common-name-in-node-certificate/1260>\
**Category:** General\
**Created:** [October 14, 2021, 6:12pm UTC](https://forum.yugabyte.com/t/hostname-as-a-common-name-in-node-certificate/1260 "2021-10-14T18:12:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ars1206](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@ars1206](https://forum.yugabyte.com/u/ars1206)\
**Post date:** [October 14, 2021, 6:12pm UTC](https://forum.yugabyte.com/t/hostname-as-a-common-name-in-node-certificate/1260/1 "2021-10-14T18:12:59Z")

</div>

As per docs [server certificate generation](https://docs.yugabyte.com/latest/secure/tls-encryption/server-certificates/) , common name in the node certificate is node I.P. address. I tried generating node certificate with commonName = node\_host\_name and installed it on node  
Yugabyte node failed to restart with this certificate. Certificate works fine if it is generated with commonName = node IP address

Does Yugabyte node certificate accepts hostname in common name? or it must be IP address only? Any suggestion?

---

<div class="post-metadata">

**Author:** ![Alan\_Caldera](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/alan_caldera/32/91_2.png) [@Alan\_Caldera](https://forum.yugabyte.com/u/Alan_Caldera)\
**Post date:** [October 18, 2021, 12:35pm UTC](https://forum.yugabyte.com/t/hostname-as-a-common-name-in-node-certificate/1260/2 "2021-10-18T12:35:03Z")

</div>

YugabyteDB does support hostnames or IPs in the common name (CN) field. If applicable, you can also put the IP in the Subject Alternative Name (SAN), if it is a fixed address in your network.  
The CN or SAN must match the specification of `rpc_bind_address` when you start your `yb-master` and `yb-tserver` processes. So if you want to use CN = hostname, then you should have the hostname in the `rpc_bind_address` flag.
