以点号结尾的域名 [英] Domain names with dots at the end

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

问题描述

有什么区别:

domainname

domainname.

?

例如,让我们假设 msn.commsn.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天全站免登陆