On Fri, Jan 22, 2010 at 11:50 AM, Thomas Charron <twaf...@gmail.com> wrote: > Is an _ allowed in a DNS name?
As usual, the real world is complicated. DNS != Internet The protocol part of DNS can handle an underscore just fine. Labels can include any character except a dot (.) or ASCII NUL. Underscores are not allowed in registered 2LD names. This is enforced by the registries. The RFCs say "Internet hosts" must have names containing only letter, digit, or dash (-) characters. Be aware that the controlling RFC predates DNS -- it dates from the days when naming was done by copying HOSTS.TXT around. The RFC is still applicable, but it lacks what would be helpful clarification as to how DNS's capabilities interact with this. Underscores are used to prefix SRV records, which are part of DNS. The underscore was chosen because it's nominally disallowed in Internet hostnames, and thus should avoid name collisions. > ... http://thingiverse_beta.s3.amazonaws.com/ ... That would generally be considered non-compliant with the requirements for Internet hosts, even though DNS can handle it. Some software attempts to enforce the former despite the later. It's a matter of opinion who is "right". Generally speaking, my advice would be to avoid using underscores in domain or host names, but if you're writing software, be prepared to handle them. "Be conservative in what you send, be liberal in what you accept." (Jon Postel, The Robustness Principle) -- Ben _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/