Hostname or e-mail is fine. Both are just a string. You can match it on your ER side.
The config with x509 looks something like this
site-to-site { peer peer1.mydomain.com { authentication { mode x509 remote-id CN=peer1.mydomain.com x509 { ca-cert-file /config/auth/ca.mydomain.com.crt cert-file /config/auth/dev.mydomain.com.crt key { file /config/ipsec.d/rsa-keys/localhost.key } } } connection-type initiate description PEER1 ike-group FOO0 ikev2-reauth inherit local-address any tunnel 1 { allow-nat-networks disable allow-public-networks disable esp-group FOO1 local { prefix 192.168.33.0/24 } remote { prefix 192.168.70.0/24 } } }