📌 1. Background: Why Implement Cloudflare CDN
In this practice, my blog was deployed on an Alibaba Cloud ECS + OneinStack environment, with the initial architecture as follows:
- Single-node WordPress deployment
- Alibaba Cloud DNS resolution
- Primarily targeting domestic access (about 80% of traffic)
- Gradually increasing overseas access
As the traffic profile shifted, I began introducing Cloudflare:
🌍 Goal: Improve overseas access speed + optimize TTFB + enhance overall stability
🧭 2. Target Migration Architecture
The final desired outcome is:
用户 ↓Cloudflare CDN(全球节点) ↓阿里云 ECS(WordPress)🧪 3. Complete DNS Migration Process (Core Steps)
[Step 1] Alibaba Cloud DNS Resolution Confirmation

[Step 2] Register on Cloudflare and Add the Site

[Step 3] DNS Record Scanning and Import

[Step 4] DNS Record Verification (Critical)

[Step 5] Cloudflare Provides NS

[Step 6] Modify Alibaba Cloud NS

[Step 7] NS Switch Submission Complete
🧠 4. DNS Propagation Verification Process
[Step 8] Local DNS Check

[Step 9] Public DNS Verification (1.1.1.1)

[Step 10] Google DNS Verification

⚡ 5. Cloudflare Official Activation Verification
[Step 11] Final NS Activation Confirmation

[Step 12] HTTP Response Header Check

[Step 13] 301 Redirect Check

[Step 14] CF-Ray Node Verification

[Step 15] Cache Status Analysis

[Step 16] Final Access Test

🌍 6. Final Architecture State
User ↓Cloudflare (DNS + CDN + TLS + Edge) ↓Alibaba Cloud ECS (WordPress)🚀 7. Key Outcomes
This migration accomplished:
✔ DNS fully migrated to Cloudflare
✔ NS globally active
✔ CDN takeover successful
✔ HTTPS + HTTP/2 active
✔ Global node acceleration (SJC, etc.)
✔ WordPress running normally
⚡ 8. Performance Changes (Initial Observations)
- Initial requests now enter the Cloudflare edge node
- 301 redirect optimization completed
- TTFB has shown an improving trend
- Overseas access path optimization completed
🧠 9. Lessons Learned
The most critical points of this migration:
✔ 1. DNS Migration ≠ CDN Activation
You must wait for global NS propagation
✔ 2. Cloudflare Requires cf-ray Verification
To determine if it has truly taken over
✔ 3. DNSSEC / NS Status Must Be Confirmed
To avoid “false activation”
✔ 4. WordPress Dynamic Pages Are Not Cached by Default
Cache Rules need to be optimized later
📌 10. Future Optimization Directions
Next, I will continue to optimize:
- Cloudflare Cache Rules (HTML caching)
- /en/ international SEO acceleration
- Static resource caching strategy
- TTFB optimization
- AdSense loading optimization

