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..
相关问题
- IPAddress.[Try]Parse parses 192.168 to 192.0.0.168
- 反爬能检测到JS模拟的键盘输入吗
- 有没有方法即使程序最小化也能对其发送按键
- What would prevent code running in a Docker contai
- Using relative links in Blogger
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 forwww.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 forexample.com
when it has the address for
example.com
's nameservers, it will send the original query, forwww.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 fortest.example.com
instead.