Find CDNs used by a website

Published: by

There is a way to load balance CDNs to make sure that our users to go the right, read best performing CDN. To learn more about this, go through my talk here: SRECon EMEA 2017. Video at: Youtube Link

I wrote a tool some time back which can be used to identify the various CDNs used by a website.

Find more details here: GITHUB Link to the project

The way it works is, it tries to resolve the FQDN from various location around the world in a hope that the FQDN resolves to different CDN owned CNAMEs. Then, this tool maintains a list of CNAMES -> CDN Name mapping. This data is represented nicely in a table.

Same output from the tool to help you understand what I'm talking about:-

➜ $?=0 shadyabhi/cdnfinder [ 4:48PM] (master|…) % ./cdnfinder -domain=static.licdn.com -timeout=0.1s -number-ns=5 -filter-countries=IN,SG,JP
WARN[0000] Skipping a line while parsing csv at line: 46346, column: 0
|-----------|----------------------|-----------------------------------------|----------------|-------------|
|  COUNTRY  |         CITY         |              CDN/HOSTNAME               |       IP       |    TIME     |
|-----------|----------------------|-----------------------------------------|----------------|-------------|
| Singapore | SG - Singapore       | EdgeCast   - cs627.wac.epsiloncdn.net.  | 202.136.162.11 | 44.04332ms  |
| India     | IN - Mumbai          | EdgeCast   - cs627.wac.epsiloncdn.net.  | 203.115.71.66  | 20.700975ms |
| India     | IN - Bhubaneswar     | EdgeCast   - cs627.wac.epsiloncdn.net.  | 202.62.224.2   | 61.284302ms |
| India     | IN - Mumbai          | EdgeCast   - cs627.wac.epsiloncdn.net.  | 202.138.120.4  | 27.423725ms |
| Singapore | SG -                 | Akamai     - e9706.dscg.akamaiedge.net. | 121.52.206.130 | 44.463913ms |
|-----------|----------------------|-----------------------------------------|----------------|-------------|
INFO[0000] Took 669.099039ms to query DNS servers...

>>>  0s elasped...
➜ $?=0 shadyabhi/cdnfinder [ 4:49PM] (master|…) %