When submitting URLs, Reddit appears to reject hostnames that contain an underscore (_). While _ is technically forbidden from hostnames by RFC 1123, it is allowed by DNS, which specifies only that higher level protocols may impose their own syntactic restrictions on domain or host names. HTTP defers to the generic URI syntax, RFC 2396, which is obsoleted by RFC 3896, which imposes almost no restrictions on the hostname (and allows for URI encoding anything that you can't otherwise put in the host name). It does mention the standard letter, digit, hyphen restrictions for DNS based host names, but specifies that other types of host names may contain other character.
It seems that it's relatively common for host names to contain underscores. There are lots of bug reports for other software complaining that they don't support underscores in host names (and most of them are resolved by allowing underscores). And when I looked through Alexa's "Top Million Sites" CSV (not a perfect data set, but one that's somewhat representative), I found more than a dozen that contained an underscore in their host name.
This bug has been previously reported and closed, but I think that it deserves another look. While technically invalid, in practice, it seems that underscores are allowed in hostnames by most software. And it's still tripping up people who are trying to post links to Reddit, such that they have to use URL shorteners as Reddit rejects the link.
Add _ to list of valid hostname characters
This is in response to reddit#289
This is in response to #289
Closed by 52d648c.