]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hostname: explain a bit why hostnames should be single DNS labels, not fqdns
authorLennart Poettering <lennart@poettering.net>
Wed, 10 Dec 2025 01:03:47 +0000 (10:03 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Dec 2025 05:17:11 +0000 (14:17 +0900)
man/hostname.xml

index 76acb8d7a5c130480b2403479f564746d9e822cb..20f00057fdc50b1dd49a6f62832d8f546dbe9dec 100644 (file)
 
     <para>The file should contain a single newline-terminated hostname string. Comments (lines starting with
     a <literal>#</literal>) 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.</para>
+    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.</para>
 
     <para id="question-mark-hostname-pattern">If the question mark character <literal>?</literal> appears in
     the hostname, it is automatically substituted by a hexadecimal character derived from the