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

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

问题描述

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

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

推荐答案

此处给出的大多数答案都是错误.拥有它是完全合法的域名中的下划线.让我引用标准,RFC2181,第 11 节,名称语法":

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

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

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.

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

See also the original DNS specification, RFC 1034, section 3.5 "Preferred name syntax" but read it carefully.

带下划线的域在野外非常常见.检查 _jabber._tcp.gmail.com_sip._udp.apnic.net.

Domains with underscores are very common in the wild. Check _jabber._tcp.gmail.com or _sip._udp.apnic.net.

这里提到的其他 RFC 处理不同的事情.原本的问题是域名.如果问题是针对主持人的名称(或对于包含主机名的 URL),那么这是不同的是,相关标准是RFC 1123, section 2.1 "Host名称和数字"这将主机名限制为字母-数字-连字符.

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天全站免登陆