Bảo vệ website với Cloudflare Protect a website with Cloudflare
Bạn có public website và muốn giảm downtime, chặn các tấn công phổ biến, cải thiện tốc độ tải trang và hiểu traffic tốt hơn. You have a public website and want to reduce downtime, block common attacks, improve loading speed, and understand traffic.
Kiến trúc gợi ý Suggested architecture
Visitor → Cloudflare DNS + Proxy + Security + Cache → Origin website Visitor → Cloudflare DNS + Proxy + Security + Cache → Origin website
Sơ đồ tham chiếu (Cloudflare Docs) Reference diagrams (Cloudflare Docs)
Bot management Bot management
Luồng phát hiện, chấm điểm và xử lý bot traffic trên edge — nền tảng cho WAF, rate limit và Bot Management. Cloudflare has bot management capabilities to help identify and mitigate automated traffic to protect domains from bad bots.
Thuật ngữ: Concepts: Bot score · Super Bot Fight Mode · WAF · Rate limiting
Sơ đồ chính thức ↗ Official diagram ↗ · Bots Bots
Designing a distributed web performance architecture Designing a distributed web performance architecture
Pattern L7: data flow, cache tiers, deployment models — giảm latency và cải thiện Core Web Vitals. A prescriptive pattern for building a Cloudflare-based L7 performance architecture that reduces latency, raises cache efficiency, and improves Core Web Vitals.
Thuật ngữ: Concepts: CDN · Cache · Core Web Vitals · Smart Shield · Argo
Sơ đồ chính thức ↗ Official diagram ↗ · Content delivery Content Delivery
Các bước thực hiện Recommended steps
- Add domain vào Cloudflare Add the domain to Cloudflare
- Review DNS records Review DNS records
- Proxy đúng records Proxy the right records
- Set SSL/TLS mode đúng cách Set SSL/TLS mode correctly
- Enable basic security rules Enable basic security rules
- Review cache behavior Review cache behavior
- Monitor analytics Monitor analytics
Lỗi thường gặp Common mistakes
Proxy hết mọi thứ mà không hiểu traffic Proxying everything without understanding traffic
Chỉ proxy những record cần đi qua Cloudflare. Các record nội bộ/đặc thù có thể cần giữ “DNS only”. Proxy only records that should pass through Cloudflare. Some internal/special records should stay “DNS only”.
Chọn sai SSL/TLS mode Wrong SSL/TLS mode
Sai mode dễ gây redirect loop hoặc “invalid certificate”. Hãy hiểu mối quan hệ giữa Cloudflare và chứng chỉ ở origin. Wrong modes can cause redirect loops or “invalid certificate”. Understand how Cloudflare interacts with your origin cert.
Cache “mù” các trang dynamic Caching dynamic pages blindly
Không cache trang có user-specific content (login/cart). Bắt đầu với static assets và các trang thật sự cacheable. Avoid caching user-specific pages (login/cart). Start with static assets and truly cacheable pages.
Không rate limit login/forms No rate limiting on login or forms
Login, signup, OTP, search là path hay bị abuse. Thêm rate limiting theo path trước. Login, signup, OTP, search are frequently abused. Add path-based rate limiting early.
Bỏ quên origin security Ignoring origin security
Cloudflare không thay thế hoàn toàn hardening ở origin. Chặn bypass, cập nhật dependencies, và kiểm soát admin endpoints. Cloudflare is not a full replacement for origin hardening. Prevent bypass, patch dependencies, and protect admin endpoints.
Next step Next step
Tiếp tục hành trình học của bạn. Continue your learning journey.