免费 cdn,使用 cloudflare 加速你的网站

介绍

cloudflare 是一家国外的 CDN 加速服务商,提供免费和付费的加速和网站保护服务。

注册

访问 https://dash.cloudflare.com/sign-up 填写账号密码进行注册

添加域名

只需要填写顶级域名,譬如 kangxuanpeng.com
填写域名

选择套餐

按需选择,本文选择 0元免费套餐

代理 dns 域名

选择需要 cdn 代理的域名,选中状态是有颜色的云朵,非选中则是灰色 点击云朵图标可以切换

更改域名服务商

提示需要更改域名服务商

以下是 namesilo.com 服务商的更改步骤

选中域名记录,点最后一个按钮

按 cloudfare 要求更改

更改成功,1到48小时生效

选择 SSL 配置

按需设置

cdn 已生效

看到以下页面内容即表示 cdn 加速已生效

验证

前后 ping 网站响应的 ip 已变更

C:\Users\HongXunPan>ping www.kangxuanpeng.com

正在 Ping www.kangxuanpeng.com [xx.xx.xx.xx] 具有 32 字节的数据:
来自 xx.xx.xx.xx 的回复: 字节=32 时间=518ms TTL=48
来自 xx.xx.xx.xx 的回复: 字节=32 时间=345ms TTL=48
请求超时。
来自 xx.xx.xx.xx 的回复: 字节=32 时间=273ms TTL=47

xx.xx.xx.xx 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 3,丢失 = 1 (25% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 273ms,最长 = 518ms,平均 = 378ms

C:\Users\HongXunPan>ping www.kangxuanpeng.com

正在 Ping www.kangxuanpeng.com [104.31.90.70] 具有 32 字节的数据:
来自 104.31.90.70 的回复: 字节=32 时间=267ms TTL=48
来自 104.31.90.70 的回复: 字节=32 时间=265ms TTL=50
来自 104.31.90.70 的回复: 字节=32 时间=266ms TTL=50
来自 104.31.90.70 的回复: 字节=32 时间=268ms TTL=50

104.31.90.70 的 Ping 统计信息:
    数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
    最短 = 265ms,最长 = 268ms,平均 = 266ms

多次访问网站,可以观察到部分请求已转移到 cdn 服务器上了

成功!

查看统计分析

查看已走 cdn 缓存的请求

还有很多设置可以自己发掘,按需配置
Responses
  1. I am truly happy to read this weblog posts which contains plenty of helpful data, thanks for providing these kinds of statistics.

    Reply
  2. Hi it's me, I am also visiting this web page daily, this web page is genuinely nice and the viewers are in fact sharing pleasant thoughts.

    Reply
  3. Hey There. I discovered your blog the usage of msn. This is an extremely neatly written article. I'll be sure to bookmark it and return to learn extra of your helpful information. Thanks for the post. I'll certainly return.

    Reply
  4. Hey there! I've been following your weblog for a while now and finally got the courage to go ahead and give you a shout out from New Caney Texas! Just wanted to mention keep up the excellent job!

    Reply
  5. Hi there, this weekend is good designed for me, for the reason that this point in time i am reading this wonderful educational article here at my residence.

    Reply
  6. Hi! This is my first comment here so I just wanted to give a quick shout out and say I really enjoy reading your posts. Can you suggest any other blogs/websites/forums that cover the same subjects? Thanks a ton!

    Reply