How can I filter the domains served by a CDN from a list of domain names?

女生的网名这么多〃 提交于 2019-12-13 09:32:11

问题


I have a list of domains and I need to filter the domains served by a CDN(Content Delivery Network). I am going to use python script to do that. At the first I was thinking I can identify them from the domain name. But not all of the domain names have cdn keyword.

Is there any reason or any feature in the CDN served domains which I use that for identifying CDN served domains?


回答1:


First of all, you can't do it with 100% accuracy.

But you can identify domains using popular cloud providers in many cases by tracking CNAME records which would lead the respective provider's servers. I.e. here's a doc on Amazon CloudFront http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html

In CloudFront, an alternate domain name, also known as a CNAME, lets you use your own domain name (for example, www.example.com) for links to your objects instead of using the domain name that CloudFront assigns to your distribution

Example:

dig -t CNAME c.amazon-adsystem.com
c.amazon-adsystem.com.  896     IN      CNAME   d1ykf07e75w7ss.cloudfront.net.


来源:https://stackoverflow.com/questions/42745391/how-can-i-filter-the-domains-served-by-a-cdn-from-a-list-of-domain-names

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!