以点号结尾的域名

编程入门 行业动态 更新时间:2024-10-26 17:32:55
本文介绍了以点号结尾的域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么区别:

domainname

domainname.

?

例如,让我们假设 msnmsn..我在这里都试过了:

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

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

http://http-headers.online-domain-tools/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 时,您的存根解析器将向 msn. 发送 dns 查询,然后您的浏览器将向其中发送一个 HTTP 请求由 dns 响应提供的 IP 地址当您键入 msn 时,域被视为相对于您的解析器的搜索列表(请参阅/etc/resolv.conf 中的搜索指令).如果搜索列表是 search foo bar,您的存根解析器将发送 msn.foo 的 dns 查询. 如果失败,它将发送一个 dns查询 msn.bar. 如果先前的 dns 查询之一成功,您的浏览器将向 dns 响应提供的 IP 之一发送 HTTP 请求. when you type msn in your browser your stub resolver will send a dns query for msn. 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 bar your stub resolver will send a dns query for msn.foo. If that fails it will then send a dns query for msn.bar. 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屋!

更多推荐

[db:关键词]

本文发布于:2023-03-26 23:04:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/670265.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:结尾   域名

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!