BOBOBK

The Risky Experience of Using Baidu Cloud Acceleration and Cloudflare Together

MISCELLANEOUS

Considering that Cloudflare’s free sites are really slow in China, and that Baidu Cloud Acceleration in China uses Cloudflare’s technology, I thought using Baidu Cloud Acceleration CDN would speed up the website’s access within China.
Here I record the entire process of using Cloudflare as CDN which caused the site to become inaccessible. 0-0

1. The website is already registered with Alibaba Cloud ICP, so Baidu Cloud could be used directly, although there’s a cumbersome real-name verification process with ID card verification, which I passed smoothly.

2. Then added the site domain to Baidu Cloud Acceleration via CNAME, and Baidu gave the CNAME record.

3. Added DNS records in Cloudflare’s domain management under the DNS section.

4. An error occurred, and the website crashed.

Reason for this situation

The error cause is that Baidu Cloud Acceleration is Cloudflare’s domestic partner. Adding both records causes a conflict, making the site completely inaccessible. Even deleting Baidu Cloud Acceleration’s records doesn’t help. It seems once Baidu Cloud Acceleration is added, Cloudflare cannot be used anymore.

Here are the solutions:

1. Use Baidu Cloud Acceleration, but it doesn’t offer free SSL. The SSL certificate costs at least 2490 RMB… so definitely not using it.

2. Use other CDNs.

3. Cancel CDN and access the origin server directly.

Here’s the process of canceling Cloudflare CDN:

1. Change NS records back to Alibaba Cloud.

2. Cancel DNSSEC by deleting DNSSEC records on Alibaba Cloud. See reference: Enable DNSSEC on Alibaba Cloud Domain to Prevent DNS Hijacking

3. Re-add DNS resolution records — just re-resolve the www domain.

After this, the website was finally accessible again.

Related