cloudflare 2026-12-02 ⏱ 3 min read

Enable HTTPS for Cloudflare Subdomains

Enable HTTPS for Cloudflare Subdomains

A subdomain such as blog.example.com or app.example.com is served over HTTPS by Cloudflare as soon as its DNS record is proxied (the orange cloud). The visitor-facing certificate is handled for you. The part you control is the connection from Cloudflare to your own server, and that is where most problems start.

This guide covers the steps in order: the DNS record, the SSL/TLS mode, the origin certificate, and the checks that confirm everything works.

Step 1: add and proxy the DNS record for HTTPS on Cloudflare subdomains

In the Cloudflare dashboard open DNS, then Records, and add an A, AAAA or CNAME record for the subdomain. Set the proxy status to Proxied. A DNS-only (grey cloud) record bypasses Cloudflare, so Cloudflare will not serve its edge certificate for that hostname.

Confirm the record with the DNS Lookup tool before testing in a browser, so you know whether you are looking at a DNS problem or a TLS problem.

Step 2: Choose the SSL/TLS encryption mode

Open SSL/TLS, then Overview. The mode decides how Cloudflare talks to your origin.

ModeCloudflare to originWhen to use it
OffPlain HTTPNever for a live site
FlexiblePlain HTTP on port 80Only if the origin cannot serve HTTPS at all. Often causes redirect loops
FullSame protocol as the visitor, certificate not validatedSelf-signed origin certificate as a stop-gap
Full (strict)HTTPS, certificate validatedRecommended. Needs a trusted or Cloudflare Origin CA certificate

Choose Full (strict) whenever the origin can present a valid certificate. Flexible hides a real gap: the visitor sees a padlock while traffic between Cloudflare and your host is unencrypted.

Step 3: Install a certificate on the origin

Full (strict) accepts either a certificate from a public CA, such as a free Let's Encrypt certificate, which lasts 90 days today and 64 from 10 February 2027 (Let's Encrypt announcement),, or a Cloudflare Origin CA certificate. The Origin CA certificate is trusted only by Cloudflare, so it works while the record is proxied and breaks direct access.

Generate a key and CSR with the CSR Generator, or issue a certificate on TryFreeSSL, then install the certificate and chain on the web server. Because a proxied hostname hides your origin from the public ACME server, DNS-based validation is usually the easier path.

Cloudflare subdomains two levels deep over HTTPS

Cloudflare's free Universal certificate covers the root domain and one level of subdomains, for example example.com and *.example.com. A name like dev.api.example.com is not covered. Options are Advanced Certificate Manager, a different naming scheme such as dev-api.example.com, or leaving that hostname unproxied with its own certificate on the origin.

Check the result

Open the subdomain in a browser and inspect the padlock, then run the SSL Checker against it. If you get an error from Cloudflare, these are the usual ones:

ErrorLikely cause
520/522Origin down, firewalled, or not answering on the expected port
525TLS handshake with the origin failed: no HTTPS listener or no shared protocol
526Full (strict) is on and the origin certificate is expired, self-signed, or missing the hostname
ERR_TOO_MANY_REDIRECTSFlexible mode combined with an HTTPS redirect on the origin

Optional hardening

After HTTPS works, turn on Always Use HTTPS and consider HSTS. Test HSTS on a small subdomain first, because browsers remember the policy for the whole max-age period. The Security Headers checker shows what the subdomain currently sends.

Related reading: free SSL for a subdomain, securing a VPS with Cloudflare SSL and what SNI is.

Frequently Asked Questions

Does Cloudflare give each subdomain its own certificate?

The Universal certificate is a shared edge certificate that lists your root domain and a wildcard for one subdomain level. You do not request one per subdomain.

Why do I get a redirect loop after enabling HTTPS?

Flexible mode sends HTTP to your origin, and the origin redirects to HTTPS, which Cloudflare sends as HTTP again. Switch to Full (strict) and install a certificate on the origin.

Can I use a self-signed certificate with Full (strict)?

No. Full (strict) needs a certificate from a public CA or a Cloudflare Origin CA certificate. A self-signed certificate works only in Full mode.

Do unproxied subdomains get Cloudflare HTTPS?

No. A DNS-only record points straight at your server, so the server must present its own valid certificate.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant