Regarding the syntax of hostnames, answers to questions like this often refer to RFC 1123 and RFC 952, but fail to mention RFC 921 which seems to place additional restrictions on hostnames. There are probably a bunch of later RFCs about the DNS (and IDN) which cover constraints on hostnames handled by the DNS.
There is a lot confusion around the valid syntax of hostnames and hostnames handled by the DNS.
Which RFCs specify the syntax requirements on hostnames and which RFCs specify additional constraints on the hostnames handled by the DNS?