域名末尾加点 [英] Domain names with dots at the end

查看:54
本文介绍了域名末尾加点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两者之间有什么区别

domainname

domainname.

?

例如,假设 msn.com msn.com..我在这里都尝试过:

For instance, let's suppose msn.com and msn.com.. I tried both here:

http://http-headers.online-domain-tools.com/link/d83cbgIenbU0KGj3/

http://http-headers.online-domain-tools.com/link/d83d3g2kZ1ioLns4/

从上面的示例中,我们可以看到两个域名均有效.但是,它们显然不一样,因为响应是不同的.

From the example above we can see that both domain names are valid. However, they are obviously not the same because the responses are different.

我相信 RFC 1035 (第7页)定义了域名.但是,语法不允许在域名的末尾加点.

I believe that RFC 1035 (p. 7) defines domain names. Yet, the grammar does not allow dot at the end of a domain name.

推荐答案

domainname.

完全限定的域名

以点结尾的域名是绝对的,而没有以点结尾的域名是相对的.

Domain names ending in a dot are absolute where as the ones not ending in a dot are relative.

尽管有一个问题... 存根解析器的默认行为是将对其中至少有一个点的任何域的请求视为对绝对域的请求.

There's a catch though... The stub resolver default behaviour is to consider a request for any domain with at least one dot in it as being a request for an absolute domain.

所以实际发生的是:

  • 在浏览器中键入 msn.com 时,存根解析器将发送对 msn.com的dns查询.,然后浏览器将向其中一个发送HTTP请求.dns响应提供的IP数量
  • 当您键入 msn 时,该域被视为相对于解析程序的搜索列表的域(请参阅/etc/resolv.conf中的搜索指令).如果搜索列表为 search foo.com bar.com ,则存根解析器将向 msn.foo.com发送dns查询.如果失败,则将发送dns.查询 msn.bar.com .如果先前的dns查询之一成功,您的浏览器将向dns响应提供的IP之一发送HTTP请求.
  • when you type msn.com in your browser your stub resolver will send a dns query for msn.com. and then your browser will send a HTTP request to one of the IPs provided by the dns response
  • when you type msn the domain is considered relative to your resolver's search list (see the search directive in your /etc/resolv.conf). If the search list is search foo.com bar.com your stub resolver will send a dns query for msn.foo.com. If that fails it will then send a dns query for msn.bar.com. If one of the previous dns queries succeeded your browser will send a HTTP request to one of the IPs provided by the dns response.

这篇关于域名末尾加点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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