Network ports

HTTP: 80 8080 | No caching: 8880 2052 2082 2086 2095
HTTPS: 443 | No caching: 2053 2083 2087 2096 8443


Settings - URL normalization: - order: Origin -> Cache -> Conf -> Single -> Page

Name Free Desc
Transform Rules free 10 no Regex support
Origin Rules 10 Override destination port
Cache Rules 10 cache properties of your HTTP requests
Configuration Rules 10 expressions / no Regex support
Single Redirects 5~20
Page Rules 3 require a “proxied” DNS record, highest priority rule at the top


SSL Modes

Flexible: visitor - Edge cert - cf
Full: cf - self signed certificate - server
Full (strict): cf - trusted CA  - server

Edge Certificates

Automatic HTTPS Rewrites safely eliminates mixed content issues by rewriting insecure URLs dynamically from known secure hosts to their secure counterpart.

Page Rules - Always Use HTTPS

Page Rules - Forwarding URL

Origin CA

15-years wildcard | visitor - Edge cert - cf - Origin CA - server:

PEM: Apache httpd and NGINX
PKCS#7: Microsoft’s IIS or Apache Tomcat

CNAME Flattening

  • CNAME records normally can not be on the zone apex. We use CNAME flattening to make it possible.
  • DNS/Settings - speeds up CNAME resolution - CNAME flattening occurs by default



npm init cloudflare my-project worker-typescript

Wrangler (Workers CLI)

npm install -g wrangler # nodejs v16.13.0+
wrangler login  # install volta/nvm if error
wrangler whoami # view permissions
wrangler init <YOUR_WORKER> && cd <YOUR_WORKER>

wrangler generate [name] [template]:

npm start # [l] turn on/off local mode
npm test
npm run deploy || wrangler publish # 1st time: wait 1min

Workers > Overview # re-login web if no menu - Online dev: worker page > click Quick edit

wrangler dev:

wrangler tail --format=pretty:

Workers as Reverse Proxy

Bulk origin override


npm init cloudflare reflare-app


R2 - S3 object

Product Free Paid - Rates
Storage 10 GB / month $0.015 / GB-month
Class A Operations 1 million requests / month $4.50 / million requests
Class B Operations 10 million requests / month $0.36 / million requests

KV - key-value

1 GB free:

Value size 25MB / 100,000 reads per day:

D1 - RDB - only be charged for base storage plus any database operations performed

Durable Objects - Workers Paid plan

Queues - Workers Paid plan

job queueing, batching and inter-Service (Worker to Worker) communication.


Product Fee Desc
Workers Paid plan $5 / month separate from any other Cloudflare plan (Free, Professional, Business)
Images $5 / month Store, resize, optimize and serve images at scale
Stream $5 / month Live and on-demand video streaming in minutes