[dns-operations] about the underline in hostname

Matthew Pounsett matt at conundrum.com
Thu May 29 14:29:09 UTC 2014


On May 29, 2014, at 04:24 , hua peng <huapeng at arcor.de> wrote:

> I found this is a valid RR:
> 
> _spf.yandex.ru.         2768    IN      TXT     "v=spf1
> include:_spf-ipv4.yandex.ru include:_spf-ipv6.yandex.ru ~all"
> 
> 
> But for A, CNAME, AAAA etc, the underline in hostname is invalid.
> Does this make a confusion?

There is a distinction between domain names and host names.  Host names are a subset of domain names; a host name is any domain name that points to an actual host (i.e. has an address record).  The rules for the characters in domain names and host names are slightly different.

Host names are only allowed the characters [a-z] (case insensitive), [0-9], and [-].  See RFCs 952 and 1123.

Domain names may use any string as a label, so for example the underscore is perfectly legal.  See RFC 2181.





More information about the dns-operations mailing list