"In the Host Name box, retain or change the host name of the local system.
You must enter a fully qualified domain name (FQDN) for the system. You must type letters, numbers, and/or the characters underscore ( _ ), dash ( - ) and period ( . )."
You can’t use underscores, or you’ll continue to get “You must use a fully-qualified DNS Name”
I had tried various combinations of “my_new_hostname.domain.com” “my_new_hostname.subname.domain.com” etc, and kept getting the error. Couldn’t get it to go away until I changed it to “MyNewHostname.sub.domain.com”
I could set the hostname using CLI to my_new_hostname.domain.com and my_new_hostname.subname.domain.com but not from GUI:
[root@my_new:Active] config b system hostname my_new_hostname.domain.com
[root@my_new_hostname:Active] config b system hostname
SYSTEM - Local Host Name: my_new_hostname.domain.com
[root@my_new_hostname:Active] config b system hostname my_new_hostname.subname.domain.com
[root@my_new_hostname:Active] config b system hostname
SYSTEM - Local Host Name: my_new_hostname.subname.domain.com
I’m not sure whether or not GUI’s error is a bug. I personally will not use underscore in the hostname as it’s not compliant with the RFC.
Yeah. Underscores should be avoided at all costs. In theory they’re invalid in the RFC’s, and a some DNS servers won’t allow them. Where they are supported, they tend to be used as special characters for finding services. e.g. _ldap.your.domain.
I don’t believe the two references quoted above are necessarily at odds with each other. Much as appreciate a good like MS bashing where they go off and ignore established standards, whoever wrote the article there is being pretty good. Saying to avoid underscores for hostnames, but that they do tend (i.e. Have been proposed) to get used for services to avoid clashing with host namespaces.