Can I have dots in a hostname?

Solution 1:

Chopper is right. Due to how DNS works, the "alpha" component of "a.alpha" is considered a discrete 'label' in DNS. Using a hostname with a dot in it will cause inconsistent results from any system that consumes DNS.

Avahi does interact with DNS names, and specifically the <host-name> directive needs to have the DNS FQDN of the service in it, so it's also subject to DNS inconsistency with dotted names.

Don't use dotted name.

Solution 2:

You're asking for trouble with that naming scheme due to DNS, consider a-alpha instead.