Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 36 ยท Getting Started

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.

Cloudflare is a company that runs one of the largest networks on the internet. You point your website at that network, and every visitor's request travels through a Cloudflare server near them before it reaches your own server. On the way, Cloudflare can answer from a cache, block attacks, compress files, run your code, or ask a visitor to prove they are human.

This course teaches the product from the first click to production-grade setups. The real Cloudflare dashboard, the Workers runtime and the global network cannot run inside this website, so the lessons describe menus, settings and commands precisely and use small runnable stand-ins (plain JavaScript programs, always labelled) that model the same ideas: caching rules, rate limits, rule expressions and so on. Treat the stand-ins as learning toys, not as copies of Cloudflare's code. Product names, limits and plan details change often, so always confirm the current numbers in the Cloudflare documentation before relying on them.

The problem Cloudflare solves

Without Cloudflare, every visitor connects straight to your origin server, the machine that really hosts your site. That has three weaknesses:

  • Distance. A visitor in Sydney waits for every round trip to a server in Frankfurt.
  • Load. Your server must generate or send every file again for every visitor, even if nothing changed.
  • Exposure. Anyone can send floods of requests, scan for vulnerabilities, or find your server's real IP address.

A reverse proxy sits in front of the origin and receives requests on its behalf. Cloudflare is a reverse proxy with servers in hundreds of cities, which fixes all three weaknesses at once.

flowchart LR
  V["Visitor"] --> E["Cloudflare edge (nearby city)"]
  E -->|"cache hit"| V
  E -->|"cache miss / dynamic request"| O["Your origin server"]
  O --> E

The edge answers what it can and only bothers the origin when it must.

What Cloudflare offers

The catalog is huge, but it falls into a few families. This course follows them in order.

Cloudflare in four layers

DNS Fast authoritative name service
CDN Cache files near visitors
Security TLS, WAF, DDoS, bots
Platform Workers, R2, KV, D1

Everything runs on the same global network.

1 / 2
  • DNS and proxying (chapter 2). Cloudflare answers DNS questions for your domain and can hide your origin behind its own addresses.
  • CDN and caching (chapter 3). Static files are stored at the edge and served without touching the origin.
  • Security (chapter 4). HTTPS certificates, a web application firewall (WAF), DDoS mitigation, rate limiting and bot defenses.
  • Workers and storage (chapters 5 and 6). Serverless code that runs at the edge, plus R2 (object storage), KV (key-value), D1 (SQL database) and more.
  • Zero Trust (chapter 7). Identity-aware access to private apps, tunnels and secure web gateways.
  • Operations (chapter 8). Logs, analytics, alerts, APIs and infrastructure-as-code.

Key vocabulary

Term Meaning
Zone One domain (like example.com) managed in a Cloudflare account
Origin Your real server or storage that hosts the content
Edge Cloudflare's servers close to visitors (also called a data center or PoP)
Proxy ("orange cloud") A DNS record whose traffic flows through Cloudflare
DNS only ("grey cloud") A DNS record that just answers with your own IP
Rule A condition plus an action, evaluated on each request

Seeing the idea in code

The first stand-in is a tiny reverse proxy with a cache. It is not how Cloudflare is built, but the flow (check cache, else ask origin, store, answer) is exactly the core idea you will meet again in chapter 3.

JS Stand-in: a reverse proxy with a cache

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Change the ttl to 300 and see how many origin calls remain. A longer lifetime means fewer origin calls but a greater risk of stale content, which is the central trade-off of caching.

How a site joins Cloudflare

You do not install anything on your server. You change where your domain's DNS is answered (lesson 4 of this chapter, Adding a site). After that, the addresses Cloudflare publishes for your hostname are Cloudflare's own, so browsers connect to the edge first. Cloudflare then opens its own connection to your origin using the real address you configured.

A second consequence: Cloudflare sees all web traffic to proxied hostnames. That is what lets it block attacks and cache pages, and it is also why you should understand its settings before changing them. Mistakes such as caching a logged-in page for everyone are very real.

Where the course goes next

The following lessons describe how the network is organized (network and anycast), how accounts and the dashboard are laid out (account, plans and API), and how to add your first site. Then DNS, caching and security get a full chapter each.

JS Stand-in: which hops see your traffic?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is a reverse proxy?

    A reverse proxy receives requests for your site and forwards them to the origin only when needed. A forward proxy is the one that hides visitors.
  2. 2. In Cloudflare terms, what is a zone?

    A zone is a domain such as example.com together with its DNS records and settings.
  3. 3. Which request can be answered without contacting your origin?

    When the edge has a fresh stored copy (a cache hit) it answers directly. Dynamic requests normally go to the origin.
  4. 4. Why are the code samples in this course called stand-ins?

    The real product runs on Cloudflare's network. Stand-ins teach the same logic in a runnable, clearly labelled form.

Summary

  • Cloudflare is a global reverse proxy and platform that sits between visitors and your origin.
  • It speeds up sites (CDN), protects them (TLS, WAF, DDoS), and lets you run code and store data at the edge.
  • A zone is one domain; proxied (orange cloud) records send traffic through Cloudflare, DNS-only (grey cloud) records do not.
  • Stand-ins in this course are teaching models, not Cloudflare's code.

Next: The Cloudflare network and anycast