Add Additional Domain Names in Openssl Certificates
Here is the command to add additional domain names:
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes\
-keyout raspberrypi.key -out raspberrypi.crt\
-addext 'subjectAltName=DNS:raspberrypi.local,DNS:raspberrypi.vpn,IP:192.168.0.222'
Then, follow the prompts.