From: Lennart Poettering Date: Wed, 10 Dec 2025 01:03:47 +0000 (+0900) Subject: hostname: explain a bit why hostnames should be single DNS labels, not fqdns X-Git-Tag: v259-rc3~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4362d942c4e1bcefb76e928e2f42ebe207a4ed03;p=thirdparty%2Fsystemd.git hostname: explain a bit why hostnames should be single DNS labels, not fqdns --- diff --git a/man/hostname.xml b/man/hostname.xml index 76acb8d7a5c..20f00057fdc 100644 --- a/man/hostname.xml +++ b/man/hostname.xml @@ -38,10 +38,12 @@ The file should contain a single newline-terminated hostname string. Comments (lines starting with a #) are ignored. The hostname should be composed of up to 64 7-bit ASCII lower-case - alphanumeric characters or hyphens forming a valid DNS domain name. It is recommended that this name - contains only a single label, i.e. without any dots. Invalid characters will be filtered out in an - attempt to make the name valid, but obviously it is recommended to use a valid name and not rely on this - filtering. + alphanumeric characters or hyphens forming a valid DNS domain name. It is strongly recommended that this + name contains only a single DNS label, i.e does not contain any dots. This recommendation reflects both + usual expectations of applications, and the fact that the Linux kernel limits the length of the system + hostname to 64 (i.e. close to the maximum DNS label length of 63) rather than 255 (the maximum DNS domain + name length). When applied, invalid characters will be filtered out in an attempt to make the name valid, + but obviously it is recommended to use a valid name and not rely on this filtering. If the question mark character ? appears in the hostname, it is automatically substituted by a hexadecimal character derived from the