Hostname as a common name in node certificate

As per docs server certificate generation , 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?

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.