SSL certificates for websites behind Cloudflare

For hosting customers · Updated 2026-10-29

On this page
  1. How issuing works behind the proxy
  2. Recommended order
  3. Which Cloudflare SSL mode to use
  4. Good to know
  5. Common questions

When a website uses Cloudflare's proxy (Proxied records), visitors connect to Cloudflare, and Cloudflare connects to this server. The connection between Cloudflare and this server needs this server's certificate too. The free certificate works behind the proxy: you do not need a Cloudflare origin certificate.

How issuing works behind the proxy

A proxied domain shows Cloudflare's addresses in DNS, not this server's. AutoSSL notices that, puts a test file in the website's /.well-known/acme-challenge/ folder and checks that it comes back through Cloudflare. If it does, the certificate is issued as usual.

  1. Add the domain to Cloudflare and copy the DNS records.
  2. Wait until the domain shows Active on the Cloudflare page.
  3. Open SSL/TLS and wait for Secured next to the domain (click Check now to speed it up).
  4. On the Cloudflare page, click Manage, then SSL: Full (strict).
  5. Then click Always use HTTPS.

Which Cloudflare SSL mode to use

ModeWorks here?
Full (strict)Yes — recommended. Cloudflare checks this server's valid certificate.
FullWorks, but Cloudflare does not check the certificate.
FlexibleNo. Cloudflare connects over HTTP, this server sends it to HTTPS, and the visitor gets "too many redirects".

Good to know

  • Keep mail, ftp and webmail records on DNS only. Mail programs connect to this server directly and use its certificate.
  • A wildcard certificate cannot be issued while Cloudflare serves the domain's DNS.
  • A Cloudflare rule that blocks or challenges /.well-known/acme-challenge/ (for example a strict firewall rule or "I'm Under Attack" mode) stops renewals. Allow that path.

Common questions

Cloudflare shows error 526 (invalid SSL certificate).

Full (strict) is on but this server has no valid certificate for the name yet. Check SSL/TLS: when it shows Secured, the error disappears. Until then, switch Cloudflare to Full in its dashboard.

Should I install a Cloudflare origin certificate?

It is not needed. If you install one with Install your own certificate, it replaces the free certificate and is trusted only by Cloudflare, not by browsers or mail apps.

Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.