假设 domain 有以下 2 条记录example.com
:
类型 | 姓名 | 内容(目的地) | 子域网址 |
---|---|---|---|
一个 | 子1 | 185.185.185.185 | sub1.example.com |
CNAME | 子2 | xxx.another-example.com | sub2.example.com |
是否可以通过 DNS 查找工具获取子域的记录内容(目标) ?
编辑:
为了澄清我的问题,我添加了一个真实案例,如下所示。这是我域上的 DNS 记录之一,它将我的子域指向 000webhost.com 上的另一个网页:
类型 | 姓名 | 内容(目的地) | 子域网址 |
---|---|---|---|
CNAME | ppp1 | testmypageeasy.000webhostapp.com | ppp1.tradecryptoforme.com |
我想知道其他人是否可以弄清楚记录的目的地(在这种情况下,testmypageeasy.000webhostapp.com
)?
是的,只要做一个常规的 DNS 查询,你就会得到相应的值。
这也适用于查询具有 CNAME 的域名,尽管在这种情况下,它取决于您的查询要求的记录类型。如果您要查询
CNAME
,那么您将始终只获得 CNAME:如果您正在查询任何其他类型,那么您仍将获得 CNAME和目标记录(如果服务器知道它 - 在此示例中,1.1.1.1 服务器将递归解析它,但如果它是非递归服务器并且目标属于另一台服务器,那么您仍然只获得 CNAME):
Generally, yes, they can. In fact, doing so is the literally the purpose of DNS – practically the only thing that a DNS server does is answer client queries about what contents your DNS records have.
Your website traffic is not relayed through your domain or through DNS servers – clients must know the contents of DNS records so that they could connect to the appropriate server.
(The only exception to this is the Cloudflare CDN, whose dashboard looks exactly like a DNS record table but is slightly more than that. Enabling the CDN proxy feature for a particular subdomain causes Cloudflare to remove that subdomain's A/AAAA record contents from DNS and to publish the CDN's own addresses in its place, therefore making the actual DNS contents different from what you've entered. Even then, though, clients can still see what was published to DNS.)
Yes. The purpose of DNS is to provide an extremely scalable look-up service where one looks up a DNS name (ie a host) and gets back a record that may be another DNS name or an address record (IP address), a text record or a few others.