hugo-teek is loading...

如何查看某个域名使用的是哪个cdn

最后更新于:

如何查看某个域名使用的是哪个cdn ?

回答

要查看某个域名使用的是哪个 CDN(内容分发网络),可以通过以下方法进行检测和分析:


1. 使用 nslookupdig 查询 DNS 记录

方法:检查 CNAME 记录

CDN 通常会为域名分配一个 CNAME 记录(如 xxx.cloudfront.netxxx.cdn20.com 等)。
操作步骤:

1nslookup 目标域名
2# 或
3dig 目标域名 CNAME

示例输出(如果使用 CDN):

1目标域名.cdn.cloudflare.net
  • 如果返回的域名包含 cdncloudfrontakamai 等关键词,大概率是 CDN 提供商。

 1[root@wiki ~]# nslookup onedayxyy.cn
 2Server:         10.23.255.1
 3Address:        10.23.255.1#53
 4
 5Non-authoritative answer:
 6onedayxyy.cn    canonical name = onedayxyy.cn.s2-web.dogedns.com.
 7onedayxyy.cn.s2-web.dogedns.com canonical name = onedayxyy.cn.cdn.dnsv1.com.cn.
 8onedayxyy.cn.cdn.dnsv1.com.cn   canonical name = k25xhrip.sched.vodtylego.tdnsvod1.cn.
 9Name:   k25xhrip.sched.vodtylego.tdnsvod1.cn
10Address: 116.207.185.29
11Name:   k25xhrip.sched.vodtylego.tdnsvod1.cn
12Address: 116.207.184.169
13Name:   k25xhrip.sched.vodtylego.tdnsvod1.cn
14Address: 116.207.184.226
15Name:   k25xhrip.sched.vodtylego.tdnsvod1.cn
16Address: 116.207.185.32
17Name:   k25xhrip.sched.vodtylego.tdnsvod1.cn
18Address: 116.207.184.230
19Name:   k25xhrip.sched.vodtylego.tdnsvod1.cn
20Address: 116.207.185.134

2. 查看 HTTP 响应头

CDN 通常会在 HTTP 响应头中添加 ServerX-CacheCDN 标识头
操作步骤:

1curl -I https://目标域名

关键字段:

  • Server: cloudflareECS(阿里云)、Apache(可能隐藏 CDN)。
  • X-Cache: HIT/MISS(表示内容是否从 CDN 缓存返回)。
  • X-CDN: 可能直接标明 CDN 提供商(如 X-CDN: Akamai)。

示例输出:

1Server: cloudflare
2CF-RAY: 58a01b12dac3d0e6-LAX

 1[root@wiki ~]# curl -I https://onedayxyy.cn
 2HTTP/1.1 200 OK
 3Last-Modified: Mon, 09 Jun 2025 22:47:17 GMT
 4Etag: "68476475-eb2a"
 5Server: nginx/1.26.1
 6Date: Mon, 09 Jun 2025 23:10:09 GMT
 7Content-Type: text/html
 8Strict-Transport-Security: max-age=31536000
 9Content-Length: 60202
10Accept-Ranges: bytes
11X-NWS-LOG-UUID: 10778161133321592430
12Connection: keep-alive
13X-Cache-Lookup: Cache Hit

3. 使用在线 CDN 检测工具

以下工具可自动分析域名是否使用 CDN 及提供商:

使用方法:
输入域名,工具会显示 CDN 提供商(如 Cloudflare、Akamai、阿里云等)。


4. 检查 IP 归属

CDN 的 IP 通常属于知名云服务商或 CDN 公司。
操作步骤:

1ping 目标域名  # 获取域名解析的 IP
2whois <IP地址>  # 查询 IP 归属

常见 CDN IP 段:

  • Cloudflare: 104.16.0.0/12
  • Akamai: 23.32.0.0/11
  • 阿里云 CDN: 47.246.0.0/16
  • 腾讯云 CDN: 119.28.0.0/16

 1[root@wiki ~]# ping onedayxyy.cn
 2PING k25xhrip.sched.vodtylego.tdnsvod1.cn (119.147.131.120) 56(84) bytes of data.
 364 bytes from 119.147.131.120 (119.147.131.120): icmp_seq=1 ttl=45 time=29.3 ms
 464 bytes from 119.147.131.120 (119.147.131.120): icmp_seq=2 ttl=45 time=29.2 ms
 5^C
 6--- k25xhrip.sched.vodtylego.tdnsvod1.cn ping statistics ---
 72 packets transmitted, 2 received, 0% packet loss, time 1001ms
 8rtt min/avg/max/mdev = 29.212/29.304/29.396/0.092 ms
 9[root@wiki ~]# whois 119.147.131.120
10% [whois.apnic.net]
11% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html
12
13% Information related to '119.144.0.0 - 119.147.255.255'
14
15% Abuse contact for '119.144.0.0 - 119.147.255.255' is 'anti-spam@chinatelecom.cn'
16
17inetnum:        119.144.0.0 - 119.147.255.255
18netname:        CHINANET-GD
19descr:          CHINANET Guangdong province network
20descr:          Data Communication Division
21descr:          China Telecom
22country:        CN
23admin-c:        CH93-AP
24tech-c:         IC83-AP
25abuse-c:        AC1573-AP
26status:         ALLOCATED PORTABLE
27remarks:        service provider
28remarks:        --------------------------------------------------------
29remarks:        To report network abuse, please contact mnt-irt
30remarks:        For troubleshooting, please contact tech-c and admin-c
31remarks:        Report invalid contact via www.apnic.net/invalidcontact
32remarks:        --------------------------------------------------------
33mnt-by:         APNIC-HM
34mnt-lower:      MAINT-CHINANET-GD
35mnt-routes:     MAINT-CHINANET-GD
36mnt-irt:        IRT-CHINANET-CN
37last-modified:  2021-06-15T08:05:44Z
38source:         APNIC
39
40irt:            IRT-CHINANET-CN
41address:        No.31 ,jingrong street,beijing
42address:        100032
43e-mail:         anti-spam@chinatelecom.cn
44abuse-mailbox:  anti-spam@chinatelecom.cn
45admin-c:        CH93-AP
46tech-c:         CH93-AP
47auth:           # Filtered
48remarks:        anti-spam@chinatelecom.cn was validated on 2025-04-24
49mnt-by:         MAINT-CHINANET
50last-modified:  2025-04-24T03:21:26Z
51source:         APNIC
52
53role:           ABUSE CHINANETCN
54country:        ZZ
55address:        No.31 ,jingrong street,beijing
56address:        100032
57phone:          +000000000
58e-mail:         anti-spam@chinatelecom.cn
59admin-c:        CH93-AP
60tech-c:         CH93-AP
61nic-hdl:        AC1573-AP
62remarks:        Generated from irt object IRT-CHINANET-CN
63remarks:        anti-spam@chinatelecom.cn was validated on 2025-04-24
64abuse-mailbox:  anti-spam@chinatelecom.cn
65mnt-by:         APNIC-ABUSE
66last-modified:  2025-04-24T03:21:54Z
67source:         APNIC
68
69person:         Chinanet Hostmaster
70nic-hdl:        CH93-AP
71e-mail:         anti-spam@chinatelecom.cn
72address:        No.31 ,jingrong street,beijing
73address:        100032
74phone:          +86-10-58501724
75fax-no:         +86-10-58501724
76country:        CN
77mnt-by:         MAINT-CHINANET
78last-modified:  2022-02-28T06:53:44Z
79source:         APNIC
80
81person:         IPMASTER CHINANET-GD
82nic-hdl:        IC83-AP
83e-mail:         abuse_gdicnoc@163.com
84address:        NO.18,RO. ZHONGSHANER,YUEXIU DISTRIC,GUANGZHOU
85phone:          +86-20-87189274
86fax-no:         +86-20-87189274
87country:        CN
88mnt-by:         MAINT-CHINANET-GD
89remarks:        IPMASTER is not for spam complaint,please send spam complaint to abuse_gdicnoc@163.com
90abuse-mailbox:  abuse_gdicnoc@163.com
91last-modified:  2021-05-12T09:06:58Z
92source:         APNIC
93
94% This query was served by the APNIC Whois Service version 1.88.34 (WHOIS-AU4)
95
96
97[root@wiki ~]# 

5. 查看 SSL/TLS 证书

部分 CDN 会使用共享证书,证书的颁发者可能包含 CDN 信息。
操作步骤:

1openssl s_client -connect 目标域名:443 -servername 目标域名 | openssl x509 -noout -issuer

示例输出:

1issuer= /C=US/O=Cloudflare, Inc./CN=Cloudflare Inc ECC CA-3

 1[root@wiki ~]# openssl s_client -connect onedayxyy.cn:443 -servername onedayxyy.cn | openssl x509 -noout -issuer
 2depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
 3verify return:1
 4depth=1 C = US, O = Let's Encrypt, CN = E5
 5verify return:1
 6depth=0 CN = onedayxyy.cn
 7verify return:1
 8issuer= /C=US/O=Let's Encrypt/CN=E5
 9read:errno=0
10[root@wiki ~]# 

6. 分析网络路径(Traceroute)

通过追踪路由,观察中间节点是否属于 CDN 提供商。
操作步骤:

1traceroute 目标域名  # Linux
2tracert 目标域名    # Windows
  • 如果中间跳转节点包含 akamai.comcloudflare.com 等,则说明使用了对应 CDN。
 1[root@wiki ~]# traceroute onedayxyy.cn
 2traceroute to onedayxyy.cn (119.147.131.120), 30 hops max, 60 byte packets
 3 1  * * *
 4 2  10.80.16.19 (10.80.16.19)  0.490 ms  0.449 ms  0.465 ms
 5 3  * * *
 6 4  10.80.16.19 (10.80.16.19)  1.509 ms  1.495 ms  1.482 ms
 7 5  10.80.16.3 (10.80.16.3)  2.567 ms  2.554 ms  2.542 ms
 8 6  * 10.80.8.160 (10.80.8.160)  3.542 ms *
 9 7  * * *
10 8  10.80.73.65 (10.80.73.65)  2.933 ms  3.158 ms 10.80.9.17 (10.80.9.17)  3.039 ms
11 9  10.78.38.6 (10.78.38.6)  4.810 ms 10.78.38.16 (10.78.38.16)  4.749 ms 10.78.38.14 (10.78.38.14)  4.486 ms
1210  * * *
1311  101.95.247.53 (101.95.247.53)  5.670 ms 101.95.247.61 (101.95.247.61)  5.674 ms 101.95.247.49 (101.95.247.49)  6.837 ms
1412  * 101.95.224.45 (101.95.224.45)  6.164 ms 101.95.224.41 (101.95.224.41)  5.245 ms
1513  202.97.19.130 (202.97.19.130)  24.910 ms 202.97.29.150 (202.97.29.150)  30.089 ms *
1614  113.96.254.114 (113.96.254.114)  33.240 ms 94.210.128.219.broad.st.gd.dynamic.163data.com.cn (219.128.210.94)  32.329 ms 113.96.254.42 (113.96.254.42)  30.310 ms
1715  14.152.84.174 (14.152.84.174)  30.328 ms  27.922 ms  30.297 ms
1816  183.6.231.222 (183.6.231.222)  28.431 ms  28.225 ms  29.693 ms
1917  * * *
2018  * * *
2119  * * *
2220  * * *
2321  * * *
2422  * * *
2523  * * *
2624  * * *
2725  * * *
2826  * * *
2927  * * *
3028  * * *
3129  * * *
3230  * * *
33[root@wiki ~]# 

常见 CDN 提供商标识

CDN 名称关键标识
Cloudflarecloudflare.comCF-RAY
Akamaiakamai.netX-Akamai-*
阿里云 CDNaliyuncs.comX-Cache: TCP_HIT
腾讯云 CDNcdntip.comX-Cache-Lookup

总结

  1. 优先检查 DNS CNAME 记录(如 dig)。
  2. 查看 HTTP 头(如 curl -I)。
  3. 使用在线工具快速识别(如 WhatCDN)。
  4. 综合 IP、证书、路由信息进一步验证。

如果域名隐藏了 CDN(如自建 CDN 或反向代理),可能需要结合多种方法分析。

结论

好像没查出个所以然来着……。。。

2025年6月10日

从当前效果看,是配置多吉云 cdn成功了:

image-20250610072522113

image-20250610072533905

推荐使用微信支付
微信支付二维码
推荐使用支付宝
支付宝二维码
最新文章

文档导航