Skip to content
Tutorials Center
My learning

Topics

Cloudflare Tutorial

Learn Cloudflare step by step: 36 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is Cloudflare? Reverse Proxy, CDN and Edge Platform Learn what Cloudflare does: a global reverse proxy that speeds up and protects websites, plus DNS, CDN, security, serverless Workers, storage and Zero Trust.
  2. 2 The Cloudflare Network: Edge Locations and Anycast Understand how Cloudflare's global network routes visitors to the nearest data center with anycast and BGP, what an edge is, and what happens inside one.
  3. 3 Cloudflare Account, Plans, Dashboard and API Tokens Tour the Cloudflare dashboard, compare Free, Pro, Business and Enterprise plans, secure your account with 2FA, and create least-privilege API tokens.
  4. 4 Adding a Site to Cloudflare: Onboarding and Nameservers Step-by-step onboarding of a domain to Cloudflare: scan DNS records, choose a plan, change nameservers at the registrar, verify activation and avoid downtime.

DNS and Proxying

  1. 5 DNS in Cloudflare: Authoritative DNS, TTLs and Managing Records How Cloudflare authoritative DNS works: zones, nameservers, resolvers versus authoritative servers, TTLs, the DNS dashboard, bulk import and the DNS API.
  2. 6 DNS Record Types in Cloudflare: A, AAAA, CNAME, MX, TXT and More A practical guide to DNS record types you will configure in Cloudflare: A, AAAA, CNAME, MX, TXT, SRV, CAA, NS and how to validate them correctly.
  3. 7 Proxy Status: Orange Cloud vs Grey Cloud in Cloudflare Learn what the orange cloud proxy does, what changes for visitors and your origin, which ports are proxied, how to hide the origin IP and when to use DNS only.
  4. 8 DNSSEC, SPF, DKIM and DMARC with Cloudflare DNS Protect your domain with DNSSEC and email authentication: enable DNSSEC in Cloudflare, add the DS record, and write SPF, DKIM and DMARC TXT records correctly.

CDN and Caching

  1. 9 How Cloudflare CDN Caching Works: Hits, Misses and Defaults Understand what Cloudflare caches by default, what the cf-cache-status values mean (HIT, MISS, EXPIRED, BYPASS, DYNAMIC) and how to inspect and debug caching.
  2. 10 Cache-Control, Edge TTL and Browser TTL in Cloudflare Master the Cache-Control header for Cloudflare: max-age versus s-maxage, no-store, private, stale-while-revalidate, ETags, Edge Cache TTL and Browser Cache TTL.
  3. 11 Cloudflare Cache Rules: Cache Everything, Bypass and Custom TTLs Use Cloudflare Cache Rules to cache HTML, bypass the cache for admin and API paths, set Edge and Browser TTL, and replace old Page Rules safely.
  4. 12 Tiered Cache, Cache Reserve and Origin Shielding in Cloudflare Raise your cache hit ratio and cut origin load with Cloudflare Tiered Cache, Smart Topology, Regional Tiers and Cache Reserve persistent storage.
  5. 13 Cloudflare Cache Purge, Cache Keys and Speed Settings Control freshness in Cloudflare: purge by URL, hostname, prefix or Cache-Tag, design cache keys with query strings, and enable compression, HTTP/3 and Early Hints.

Security: WAF and DDoS

  1. 14 Cloudflare SSL/TLS Modes: Flexible, Full, Full (Strict) and HSTS Choose the right Cloudflare SSL/TLS encryption mode, install an Origin CA certificate, fix redirect loops, enable HSTS and Always Use HTTPS, and set a minimum TLS version.
  2. 15 Cloudflare WAF: Managed Rulesets, OWASP and Attack Scores Learn how the Cloudflare Web Application Firewall blocks SQL injection, XSS and known exploits using managed rulesets, OWASP scoring, actions and exceptions.
  3. 16 Cloudflare Custom Rules and the Rules Expression Language Write Cloudflare WAF custom rules with the expression language: fields, operators, functions, countries, ASNs, IP lists, rule order and actions with real examples.
  4. 17 Cloudflare Rate Limiting Rules: Stop Brute Force and Abuse Configure Cloudflare rate limiting to stop login brute force, scraping and API abuse: match expression, characteristics, period, threshold, action and mitigation timeout.
  5. 18 Cloudflare DDoS Protection, Bot Management and Turnstile How Cloudflare stops DDoS attacks automatically, what Under Attack Mode and Bot Fight Mode do, how bot scores work, and how to use Turnstile CAPTCHA alternative.

Workers

  1. 19 Cloudflare Workers: What They Are and Why They Matter Learn what Cloudflare Workers are, how isolates differ from containers and servers, what the fetch handler looks like, and when serverless edge code is the right tool.
  2. 20 Requests, Responses and Routing in Cloudflare Workers Build a Worker router: read the URL, method, headers and JSON body, return JSON and redirects, set status codes and CORS headers, and handle errors cleanly.
  3. 21 Workers Subrequests, fetch() and the Cache API Call origins and APIs with fetch() from a Worker, control edge caching with cf options and the Cache API, use waitUntil for background work and avoid subrequest limits.
  4. 22 Wrangler: Create, Test and Deploy a Cloudflare Worker Create a Worker project with Wrangler, read the wrangler config, run it locally, set secrets and variables, use environments, add routes and a cron trigger, and deploy.

Storage: R2, KV and D1

  1. 23 Choosing Cloudflare Storage: KV, R2, D1 and Durable Objects Compare Cloudflare's storage products by data shape, consistency, size and cost, then pick the right one with a decision guide, a diagram and a runnable chooser.
  2. 24 Workers KV: Key-Value Storage at the Edge Use Workers KV from a Worker: create a namespace, read and write values with get, put, list and delete, set expirations and metadata, tune cacheTtl and avoid common KV mistakes.
  3. 25 Cloudflare R2: S3-Compatible Object Storage Store files in Cloudflare R2: create buckets, upload and download through a Worker binding or the S3 API, set metadata, list by prefix, serve public files and understand pricing.
  4. 26 Cloudflare D1: SQL Database for Workers Learn Cloudflare D1: create a database, write migrations, query with prepare, bind, all, first and run, use batch transactions, design indexes and know D1's limits.

Zero Trust

  1. 27 Cloudflare Zero Trust: Replace the VPN, Protect Every App Understand Zero Trust and Cloudflare's products for it: Access, Tunnel, Gateway, WARP and Browser Isolation. Learn identity-based policies, a setup path and a runnable policy simulator.
  2. 28 Cloudflare Access: Add Login and Policies to Any App Protect an application with Cloudflare Access: create a self-hosted app and policy, use login methods, validate the Access JWT in your origin and use service tokens for machines.
  3. 29 Cloudflare Tunnel, WARP and Gateway Explained Publish a private server with Cloudflare Tunnel and cloudflared, write a tunnel config, then filter outbound traffic with WARP and Gateway DNS and HTTP policies.

Operations and Analytics

  1. 30 Cloudflare Analytics, Logs and Observability Read Cloudflare analytics, query the GraphQL Analytics API, send logs with Logpush, observe Workers with wrangler tail and Workers Logs, and compute cache hit ratio and error rates.
  2. 31 Cloudflare API, Terraform and Automation Automate Cloudflare with API tokens, the v4 REST API, curl and JavaScript examples, pagination, rate limits, the Terraform provider and a safe DNS change workflow with drift checks.
  3. 32 Cloudflare Limits, Costs and Troubleshooting Errors Diagnose common Cloudflare errors (520 to 526, 1000-series, Worker 1101), understand plan limits and costs, and follow a step-by-step troubleshooting method with a runnable error lookup.

Projects and Practice

  1. 33 Project: Build a URL Shortener on Cloudflare Workers Build a URL shortener: design the API, generate short codes, validate URLs, store links in KV, count clicks, test the Worker locally with stand-ins and deploy it with Wrangler.
  2. 34 Project: A Caching API and Image Gateway on Workers and R2 Build an edge gateway: serve images from R2 with cache headers and conditional requests, proxy and cache an upstream API, add rate limiting, secure headers and structured logging.
  3. 35 Project: Protect an Internal App with Tunnel and Access Publish an internal dashboard safely: run it on a private host, connect it with Cloudflare Tunnel, add an Access policy with MFA, verify the JWT in the app and audit access.
  4. 36 Practice: Cloudflare Scenarios, Exercises and Review Test your Cloudflare skills with realistic scenarios: Worker design, storage choices, Zero Trust, troubleshooting and cost questions, runnable exercises and a self-scoring review quiz.