可以(域名)子域具有下划线“_”在里面? [英] Can (domain name) subdomains have an underscore "_" in it?

查看:881
本文介绍了可以(域名)子域具有下划线“_”在里面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

子域名(域名)可以下划线_吗?

解决方案

假即可。将
作为域名中的下划线是完全合法的。让我引用标准, RFC
2181,第11节名称语法


DNS本身只对特定标签
放置一个限制,可用于标识资源记录。一个
限制涉及标签的长度和完整的
名称。 [...] DNS协议的实现不得对可以使用的标签放置任何
限制。特别是,DNS
服务器不能拒绝服务一个区域,因为它包含一些DNS客户端程序可能无法接受的标签


另请参阅原始DNS规范, RFC 1034 ,第3.5节
首选名称语法,但仔细阅读。



具有下划线的域名在野外非常常见。检查 _jabber._tcp.gmail.com _sip._udp.apnic.net



这里提到的其他RFC处理不同的事情。原来的
问题是域名。如果问题是主机
名称
(或包含主机名的URL),那么这是
不同,相关标准是 RFC 1123 ,第2.1节主机
名称和数字限制主机名
字母数字连字符。


Can subdomains (domain names) have underscore "_" in them?

解决方案

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":

The DNS itself places only one restriction on the particular labels that can be used to identify resource records. That one restriction relates to the length of the label and the full name. [...] Implementations of the DNS protocols must not place any restrictions on the labels that can be used. In particular, DNS servers must not refuse to serve a zone because it contains labels that might not be acceptable to some DNS client programs.

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.

这篇关于可以(域名)子域具有下划线“_”在里面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆