Orange Book
CDN and web performance

04 · Build an HTTPS and TLS 1.3 security baseline

After Full strict is stable, configure HTTPS redirects, minimum TLS, TLS 1.3, and HSTS in an order that preserves compatibility and rollback options.

Edited and verified by Orange Book Editorial Team ·

CDN · PHASE 2BEGINNERAbout 24 minutesHTTPS · TLS 1.3 · HSTS

Outcome

HTTP requests redirect to HTTPS at the Cloudflare edge, modern clients can negotiate TLS 1.3, compatibility evidence determines whether older protocols are rejected, and HSTS is introduced gradually only after certificates and every covered hostname are stable.

Four settings solve four different problems

CapabilityWhat it doesWhat it does not fixRisk
Always Use HTTPSRedirects visitor HTTP requests to HTTPSHTTP subresources hard-coded inside HTMLLow, but check for redirect loops
Minimum TLS VersionRejects visitor connections below the selected versionTLS between Cloudflare and the originMedium; it removes legacy clients
TLS 1.3Lets modern clients use the newer TLS versionIt does not expose individual TLS 1.3 cipher selectionLow, with compatibility testing
HSTSTells browsers to use only HTTPS for a periodCertificate renewal, origin HTTPS, or mixed contentHigh; browsers remember the policy

Finish end-to-end TLS first

Proceed only after Full strict and the origin certificate are stable. If you publish a long HSTS policy and later disable HTTPS or let a certificate fail, browsers that remember the policy can remain unable to connect until Max-Age expires.

Capture the baseline

curl -sS -I http://www.example.com/
curl -sS -I https://www.example.com/

Record status codes, Location, certificate coverage, and the current redirect chain. Test the homepage, sign-in entry, and one static asset so a cached path does not become your only evidence.

Enable Always Use HTTPS

In SSL/TLS → Edge Certificates, enable Always Use HTTPS. It applies across the zone. If the origin also performs redirects, retain one clear canonicalization path so HTTP/HTTPS and www/apex rules do not chase each other.

curl -sS -I http://www.example.com/

The request should reach the intended https:// URL in a bounded number of redirects. Always Use HTTPS does not rewrite HTTP assets inside the document. Fix application output first, then evaluate Automatic HTTPS Rewrites if needed.

Audit the minimum TLS version

Minimum TLS is the oldest version you accept; it does not force every client to use TLS 1.3. A modern public site can consider TLS 1.2 after reviewing logs and client requirements. Legacy devices, embedded clients, and old APIs require a test hostname first. The zone-level setting covers every hostname; a per-hostname minimum requires Advanced Certificate Manager.

curl -sS -I --tls-max 1.1 https://www.example.com/

When the minimum is TLS 1.2, this legacy-protocol test should fail the handshake. Do not infer compatibility from one modern browser.

Enable and verify TLS 1.3

Enable TLS 1.3 under SSL/TLS → Edge Certificates. It applies to the entire zone, is currently available on all plans, and does not provide individual TLS 1.3 cipher selection.

openssl s_client -connect www.example.com:443 \
  -servername www.example.com -tls1_3 </dev/null

Inspect the negotiated protocol and certificate hostname. This command requires a local OpenSSL build with TLS 1.3 support; otherwise, cross-check in the browser Security panel.

Introduce HSTS last

Verify that every subdomain you intend to cover can sustain valid HTTPS. Then open SSL/TLS → Edge Certificates → HTTP Strict Transport Security (HSTS) and start with a short Max-Age. Observe certificate renewal, legacy hosts, and third-party services before extending it.

includeSubDomains extends the promise to every subdomain. preload also places it in browser preload lists, and removal is not immediate. Select them only when the entire domain tree meets the requirements and can maintain them over time.

Acceptance matrix

CheckExpectedInspect first on failure
HTTP homepageRedirects to one canonical HTTPS URLRedirect Rules, origin redirects, encryption mode
HTTPS homepageValid certificate and no loopEdge Certificates, SAN, clock, certificate chain
TLS 1.1 maximum testHandshake fails when minimum is TLS 1.2Minimum TLS setting on the target zone
TLS 1.3 testNegotiates TLS 1.3Client support, zone setting, intermediate network
Response headersStrict-Transport-Security only after HSTS is enabledHost coverage, Max-Age, rule scope

The next chapter separates HTTP/2, HTTP/3, and 0-RTT above the TLS layer.

Primary sources

Did this page help you complete your goal?

Beta feedback is generated in this browser and is never uploaded automatically.

On this page