Can subdomains (domain names) have underscore _
in them?
相关问题
- Find who is hosting a website using PHP
- On Linux, Java issues reverse DNS lookups when a s
- How to balance webserver bandwith usage?
- Are x86 Assembly Mnemonic standarized?
- How to get full host name in C#?
相关文章
- 如何通过命令行测试dns反向解析
- Is there a standard way to store XY data in python
- How do I enable custom domains for my users?
- What is the longest possible email address? [dupli
- performance for searching through 100 million reco
- Build a DNS Proxy in C
- Universal local network name resolution method wit
- W3C document states
Here my 2 cents from Java world:
From a Spark Scala console, with Java 8:
It's definitely a bad idea ^^
Most answers given here are false. It is perfectly legal to have an underscore in a domain name. Let me quote the standard, RFC 2181, section 11, "Name syntax":
See also the original DNS specification, RFC 1034, section 3.5 "Preferred name syntax" but read it carefully.
Domains with underscores are very common in the wild. Check
_jabber._tcp.gmail.com
or_sip._udp.apnic.net
.Other RFC mentioned here deal with different things. The original question was for domain names. If the question is for host names (or for URLs, which include a host name), then this is different, the relevant standard is RFC 1123, section 2.1 "Host Names and Numbers" which limits host names to letters-digits-hyphen.