问题描述
我的问题是,我的网站是xyz.com我可以在世界任何地方访问它,但我很好奇知道所有的dns服务器如何知道我的网站的IP地址。 。?
我有点困惑..
通过DNS解析IP地址的主要过程是引用。 DNS服务器将通过一个过程找到您的域的Authorative Nameserver。授权名称服务器是配置为回答该域的查询的服务器。即,如果您已经购买了Godaddy DNS服务器,并通过它们配置了一个域名。
如果您访问 www.example.com
,它将向您配置的DNS服务器发送查询,询问 www.example.com
如果您配置的DNS服务器已经知道答案,即最近已经询问相同的问题,它将从缓存中返回答案(只要尚未过期)
如果您配置的DNS服务器不知道,那么它会发现。为了找出什么服务器了解答案,首先需要查找example.com的名称服务器。
所以名称服务器所做的第一个查询是根域。 (所有DNS服务器应该具有这些配置)来查找 .com
域的名称服务器。
当它具有 .com
域名服务器的地址时,它将发送一个查询请求名称服务器 example.com
当它的地址为 example.com
的名称服务器,它会将 www.example.com
的原始查询发送到该服务器,并将答案返回给您(并将其复制到注意:如果您正在寻找 www.test.example.com
,那么它的缓存不会被其他任何人询问)
它可能会要求example.com为 test.example.com
的名称服务器。
My question is that suppose my website is "xyz.com"I can access it anywhere in the world, but I'm curious to know how does all the dns servers know the ip address of my website..? I'm little bit confused..
The main process that resolves an IP Address through DNS is referrals. A DNS Server will go through a process to find the Authorative Nameserver for your domain. The Authorative Nameserver is the server that is configured to answer queries for that domain. i.e. the godaddy DNS Servers, if you have purchased, and configured a domain name through them.
If you go to www.example.com
from your PC, it will send a query to your configured DNS server, asking for www.example.com
If your configured DNS Server knows that answer already, i.e. it has been asked the same question recently, it will return the answer from cache (as long as it hasn't expired)
If your configured DNS Server doesn't know, then it will find out. In order to find out what server knows the answer, it needs to look up the name server for example.com first.
So the first query the nameserver makes is to the root domain "." (All DNS Servers should have these configured) to find out the nameservers for the .com
domain.
When it has an address for the .com
domain's nameservers, it will send a query asking for the nameserver for example.com
when it has the address for example.com
's nameservers, it will send the original query, for www.example.com
, to that server, and return the answer to you (and put a copy in its cache incase anyone else asks)
Note: If you were looking for www.test.example.com
then it would have asked example.com for the nameservers for test.example.com
instead.
这篇关于dns服务器如何工作知道网站的IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!